CommitButtonText | commitButtonText property

ContactPicker.CommitButtonText | commitButtonText property

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

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

Syntax


var commitButtonText = contactPicker.commitButtonText;
contactPicker.commitButtonText = commitButtonText;

Property value

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The text of the button.

Remarks

We recommend you set CommitButtonText to provide an indication to the user that they have selected a contact or set of contacts.

Examples

This example demonstrates how to use the CommitButtonText property.



function selectContact() {
    // Create the picker
    var picker = new Windows.ApplicationModel.Contacts.ContactPicker();
    picker.commitButtonText = "Select";
    picker.selectionMode = Windows.ApplicationModel.Contacts.ContactSelectionMode.fields;
    picker.desiredFieldsWithContactFieldType.append(Windows.ApplicationModel.Contacts.ContactFieldType.email);    

    // Open the picker for the user to select a contact
    picker.pickContactAsync().done(function (contact) {
        var contactElement = document.createElement("div");
        contactElement.innerText = contact.name + " " + contact.emails[0].address;
        document.body.appendChild(contactElement);
    });
}



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

 

 

Show:
© 2016 Microsoft