ContactManager.ShowContactCard | showContactCard methods

Applies to Windows only

Queries the operating system for a user’s contact and shows the contact data in a contact card. Typically this displays a UI, but some error cases might not display the UI. See Remarks.

Overload list

MethodDescription
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) Queries the operating system for a user’s contact and shows the contact data in a contact card.

Remarks

Note  Source apps must be running in the foreground to call one of the ShowContactCard methods. An app that runs in the background will get an "Access Denied" exception if it calls one of the ShowContactCard methods.

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 (Windows Store apps using C#/VB/C++ and XAML) and Managing contact cards (Windows Store apps using JavaScript and HTML).

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

Contact manager API sample
ContactManager
Contact

 

 

Show:
© 2014 Microsoft. All rights reserved.