ContactPickerUI class

0 out of 1 rated this helpful - Rate this topic

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.

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 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-onlySpecifies the fields 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



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

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

Metadata

Windows.winmd

 

 

Build date: 12/4/2012

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.