Dela via


ContactPicker Class

Definition

Controls how the Contact Picker user interface opens and what information it shows.

public ref class ContactPicker sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
class ContactPicker final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class ContactPicker final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public sealed class ContactPicker
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class ContactPicker
function ContactPicker()
Public NotInheritable Class ContactPicker
Inheritance
Object Platform::Object IInspectable ContactPicker
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)
App capabilities
contactsSystem

Remarks

The ContactPicker class enables users to select one or more contacts from any app that supports the Contact Picker contract. You can configure the ContactPicker class to accept only a single contact, or multiple contacts. In addition, you can request that the app providing the contact information return the entire set of data for each contact, or just specific fields.

For more info about how to select contacts, see Select contacts.

Version history

Windows version SDK version Value added
1703 15063 CreateForUser
1703 15063 IsSupportedAsync
1703 15063 User

Constructors

ContactPicker()

Initializes a new instance of the ContactPicker class.

Properties

CommitButtonText

Sets the text for the confirmation button in the Contact Picker user interface.

Note

This property is no longer available starting with Windows 10.

DesiredFields

Sets the contact fields your app is interested in.

Note

This property is no longer available starting with Windows 10.

DesiredFieldsWithContactFieldType

Gets the ways to connect with a contact.

SelectionMode

Controls whether the Contact Picker shows contacts as a complete entity or as a collection of fields.

Note

This property is no longer available starting with Windows 10.

User

Gets the User associated with the ContactPicker.

Methods

CreateForUser(User)

Creates a new ContactPicker for a specific User.

IsSupportedAsync()

Gets a Boolean value that indicates whether the contact picker is supported on the current platform.

PickContactAsync()

Launches the Contact Picker to select a single contact.

PickContactsAsync()

Launches the Contact Picker for selecting multiple contacts.

PickMultipleContactsAsync()

Launches the Contact Picker for selecting multiple contacts.

Note

This method is no longer available starting with Windows 10.

PickSingleContactAsync()

Launches the Contact Picker for selecting a single contact.

Note

This method is no longer available starting with Windows 10.

Applies to

See also