PickMultipleContactsAsync | pickMultipleContactsAsync method

ContactPicker.PickMultipleContactsAsync | pickMultipleContactsAsync method

Launches the Contact Picker for selecting multiple contacts.

Note  This method is no longer available starting with Windows 10.
 

Syntax


Public Function PickMultipleContactsAsync() As IAsyncOperation(Of IReadOnlyList)

Parameters

This method has no parameters.

Return value

Type: IAsyncOperation<IVectorView>

The operation that launches the contact picker.

Remarks

To pick only a single contact, use PickSingleContactAsync.

Use the SelectionMode property to control whether your app receives all of a contact's information, or just specific fields.

Examples

This example demonstrates how to use PickMultipleContactsAsync to get multiple contacts.


function selectContacts() {
    var picker = Windows.ApplicationModel.Contacts.ContactPicker();
    picker.commitButtonText = "Select";
    picker.pickMultipleContactsAsync().then(function (contacts) {
        contacts.forEach(function (contact) {
            var contactElement = document.createElement("div");
            contactElement.innerText = contact.name;
        });
    });
}


Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

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

Metadata

Windows.Foundation.UniversalApiContract.winmd

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

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

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

Metadata

Windows.winmd

See also

ContactPicker
PickContactsAsync

 

 

Show:
© 2017 Microsoft