ContactManager.ShowContactCard ContactManager.ShowContactCard ContactManager.ShowContactCard ContactManager.ShowContactCard ContactManager.ShowContactCard Method

Definition

Overloads

ShowContactCard(Contact, Rect) ShowContactCard(Contact, Rect) ShowContactCard(Contact, Rect) ShowContactCard(Contact, Rect) ShowContactCard(Contact, Rect)

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

ShowContactCard(Contact, Rect, Placement) ShowContactCard(Contact, Rect, Placement) ShowContactCard(Contact, Rect, Placement) ShowContactCard(Contact, Rect, Placement) ShowContactCard(Contact, Rect, Placement)

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

ShowContactCard(Contact, Rect, Placement, ContactCardOptions) ShowContactCard(Contact, Rect, Placement, ContactCardOptions) ShowContactCard(Contact, Rect, Placement, ContactCardOptions) ShowContactCard(Contact, Rect, Placement, ContactCardOptions) ShowContactCard(Contact, Rect, Placement, ContactCardOptions)

Shows a contact card with the specified parameters.

ShowContactCard(Contact, Rect) ShowContactCard(Contact, Rect) ShowContactCard(Contact, Rect) ShowContactCard(Contact, Rect) ShowContactCard(Contact, Rect)

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

public : static void ShowContactCard(Contact contact, Rect selection)
static void ShowContactCard(Contact contact, Rect selection) const;
public static void ShowContactCard(Contact contact, Rect selection)
Public Shared Sub ShowContactCard(contact As Contact, selection As Rect)
Windows.ApplicationModel.Contacts.ContactManager.showContactCard(contact, selection);

Parameters

contact
Contact Contact 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
Rect Rect 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.

Additional features and requirements

Capabilities
contactsSystem

Remarks

Note

Source apps must be running in the foreground to call this method. An app that runs in the background will get an "Access Denied" exception if it calls this method.

Most typical operations will result in displaying a UI.

  • If there is one exact match for the requested contact: Shows the contact card UI with information from the contacts store in the operating system.
  • If there are multiple matches: Shows the contact card UI for the first matching contact found.
  • If there is no match: Shows the contact card UI, where the contact info comes from the input contact object.

If there's an error, such as an invalid input for the contact parameter, no UI is displayed.

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 and Managing contact cards .

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.

See Also

ShowContactCard(Contact, Rect, Placement) ShowContactCard(Contact, Rect, Placement) ShowContactCard(Contact, Rect, Placement) ShowContactCard(Contact, Rect, Placement) ShowContactCard(Contact, Rect, Placement)

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

public : static void ShowContactCard(Contact contact, Rect selection, Placement preferredPlacement)
static void ShowContactCard(Contact contact, Rect selection, Placement preferredPlacement) const;
public static void ShowContactCard(Contact contact, Rect selection, Placement preferredPlacement)
Public Shared Sub ShowContactCard(contact As Contact, selection As Rect, preferredPlacement As Placement)
Windows.ApplicationModel.Contacts.ContactManager.showContactCard(contact, selection, preferredPlacement);

Parameters

contact
Contact Contact 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
Rect Rect 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.

preferredPlacement
Placement Placement Placement

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

Additional features and requirements

Capabilities
contactsSystem

Remarks

See the remarks section of this overload: ShowContactCard.

See Also

ShowContactCard(Contact, Rect, Placement, ContactCardOptions) ShowContactCard(Contact, Rect, Placement, ContactCardOptions) ShowContactCard(Contact, Rect, Placement, ContactCardOptions) ShowContactCard(Contact, Rect, Placement, ContactCardOptions) ShowContactCard(Contact, Rect, Placement, ContactCardOptions)

Shows a contact card with the specified parameters.

public : static void ShowContactCard(Contact contact, Rect selection, Placement preferredPlacement, ContactCardOptions contactCardOptions)
static void ShowContactCard(Contact contact, Rect selection, Placement preferredPlacement, ContactCardOptions contactCardOptions) const;
public static void ShowContactCard(Contact contact, Rect selection, Placement preferredPlacement, ContactCardOptions contactCardOptions)
Public Shared Sub ShowContactCard(contact As Contact, selection As Rect, preferredPlacement As Placement, contactCardOptions As ContactCardOptions)
Windows.ApplicationModel.Contacts.ContactManager.showContactCard(contact, selection, preferredPlacement, contactCardOptions);

Parameters

contact
Contact Contact 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
Rect Rect 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.

preferredPlacement
Placement Placement Placement

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

contactCardOptions
ContactCardOptions ContactCardOptions ContactCardOptions

Specifies how to display the contact card, such as which tab to start on when displaying a mini contact card.

Additional features and requirements

Capabilities
contactsSystem

Remarks

See the remarks section of this overload: ShowContactCard.

See Also