Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ContactPickerUI class

Allows you to call the contact picker UI so you can select one or more contacts.

Syntax


public ref class ContactPickerUI sealed 

Members

The ContactPickerUI class has these types of members:

Events

The ContactPickerUI class has these events.

EventDescription
ContactRemoved Occurs when the user deselects or removes the contact.

 

Methods

The ContactPickerUI class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
AddContact(Contact) Adds a Contact. The Contact.Id property must be set when you call AddContact. If Contact.Id isn't set, your app will fail.
AddContact(String,Contact) AddContact may be altered or unavailable for releases after Windows 8.1. Instead, use AddContact without the ID. Adds a Contact.
ContainsContact Checks to see whether the contact was already selected by the user.
RemoveContact Removes a contact.

 

Properties

The ContactPickerUI class has these properties.

PropertyAccess typeDescription

DesiredFields

Read-onlyDesiredFields may be altered or unavailable for releases after Windows 8.1. Instead, use DesiredFieldsWithContactFieldType. Specifies the fields that you want returned after the user selects one or more contacts.

DesiredFieldsWithContactFieldType

Read-onlyGets the fields with contact field type that you want returned after the user selects one or more contacts.

SelectionMode

Read-onlyDetermines the selection mode for the contact picker. The most common options are PickSingleContactAsync or PickMultipleContactsAsync.

 

Remarks

To see an example of how to use this class, check out our code sample.

Examples

This example code prepares the page to use ContactPickerUI:

No code example is currently available or this language may not be supported.

This example code shows how to add a contact to the basket with the AddContact(Contact) method.

No code example is currently available or this language may not be supported.

This example code shows how to remove a contact from the basket and respond to its removal.

No code example is currently available or this language may not be supported.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.ApplicationModel.Contacts.Provider
Windows::ApplicationModel::Contacts::Provider [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

None supported

Namespace

Windows.ApplicationModel.Contacts.Provider
Windows::ApplicationModel::Contacts::Provider [C++]

Metadata

Windows.winmd

Attributes

[Version(0x06020000)]

See also

Object

 

 

Show:
© 2015 Microsoft