Contains the information about a contact.
Syntax
/* For information about creating or accessing this object, see Remarks. */
Attributes
- VersionAttribute(NTDDI_WIN8)
Members
The ContactInformation class has these types of members:
Methods
The ContactInformation class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.
| Method | Description |
|---|---|
| GetThumbnailAsync | Gets the thumbnail image for the contact. |
| QueryCustomFields | Enables you to get the value for a custom field that is stored with a contact. |
Properties
The ContactInformation class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | A read-only list of the custom fields stored with the contact. | |
| Read-only | A read-only list of email addresses stored with the contact. | |
| Read-only | A read-only list of instant messaging accounts stored with the contact. | |
| Read-only | A read-only list of locations stored with the contact. | |
| Read-only | The name of the contact. | |
| Read-only | A read-only list of phone numbers stored with the contact. |
Remarks
Typically, you access ContactInformation objects as the result of asynchronous method and/or function calls. For example, both of the static methods PickSingleContactAsync and PickMultipleContactsAsync return ContactInformation objects that represent the selected contact.
When your app receives contact information from a contact provider, the data for each contact is returned in a ContactInformation object.
Examples
This code demonstrates how a ContactInformation object is returned to an app after a user selects a contact.
function selectContact() { var picker = Windows.ApplicationModel.Contacts.ContactPicker(); picker.commitButtonText = "Select"; picker.selectionMode = Windows.ApplicationModel.Contacts.ContactSelectionMode.fields; picker.desiredFields.append(Windows.ApplicationModel.Contacts.KnownContactField.email); picker.pickSingleContactAsync().then(function (contact) { var contactElement = document.createElement("div"); contactElement.innerText = contact.name + " " + contact.emails[0].value; document.body.appendChild(contactElement); }); }
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