Windows Dev Center

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

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


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



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.


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.


Type: Placement

The Placement that describes the preferred placement of the contact card.


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.

For info about how to manage contacts, see Managing contact cards (XAML) and Managing contact cards (HTML).

Requirements (Windows 10 device family)

Device family


API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0


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



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

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

None supported


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



See also

Contact manager API sample
ShowContactCard(Contact, Rect)



© 2015 Microsoft