Allows you to call the contact picker UI so you can select one or more contacts.
Syntax
/* For information about creating or accessing this object, see Remarks. */
Attributes
- VersionAttribute(NTDDI_WIN8)
Members
The ContactPickerUI class has these types of members:
Events
The ContactPickerUI class has these events.
| Event | Description |
|---|---|
| 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.
| Method | Description |
|---|---|
| AddContact | 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.
| Property | Access type | Description |
|---|---|---|
| Read-only | Specifies the fields that you want returned after the user selects one or more contacts. | |
| Read-only | Determines 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
var picker = Windows.ApplicationModel.Contacts.ContactPickerUI(); picker.pickSingleContactAsync().then(function (contact) { if (contact !== null) { // Display the fields on the contact appendContact(contact, id("scenario1Contacts")); } else { id("scenario1Contacts").innerText = "No contacts were selected"; } });
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Namespace |
|
|
Metadata |
|
Build date: 12/4/2012