ContactManager.ShowContactCard(Contact, Rect) | showContactCard(Contact, Rect) method

Applies to Windows only

Queries the operating system for a user’s contact and shows the contact data in a contact card.

Syntax


Windows.ApplicationModel.Contacts.ContactManager.showContactCard(contact, selection);

Parameters

contact

Type: Contact

The object that represents the contact that the app wants to display the contact card for.

contact must contain at least an Id, Emails, or a phone number from a Phones list to query the user’s contact database to retrieve a matching contact to display. Id has higher priority for querying. If an Id matches, the rest of query parameters will be ignored for matching purposes. If an Id does not find a match, the query uses the rest of query parameters. Emails and Phones have equal priority for matching. If multiple email addresses, or phone numbers, or both are provided, the query first performs an exact match, requiring all query parameters to match a system contact record. If this results in no matches, the query uses "best effort" match, in which a match of any query parameters is sufficient.

If no matches occur, the data in the input contact displays in the contact card. If a match occurs, only system contact data displays, and the data in the input contact is discarded.

selection

Type: Rect

The Rect is the rectangular area of user selection (for example, pressing a button), around which the operating system displays the contact card, not within that rectangular area. For example, if an app uses a button to show the contact card, pass the Rect of the button so the contact card displays around the button, not overlapping it.

Remarks

For querying purposes, phone numbers support characters 0-9 and a-z/A-Z. If you put any other characters in a phone number, they are ignored when you query the contact.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

None supported

Namespace

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

Metadata

Windows.winmd

See also

ContactManager
ShowContactCard(Contact, Rect, Placement)

 

 

Show:
© 2014 Microsoft