ContactManagerForUser ContactManagerForUser ContactManagerForUser ContactManagerForUser Class

Definition

Represents a service that source apps can call to access contact data for a specific user.

public : sealed class ContactManagerForUser : IContactManagerForUser, IContactManagerForUser2
public sealed class ContactManagerForUser : IContactManagerForUser, IContactManagerForUser2
Public NotInheritable Class ContactManagerForUser Implements IContactManagerForUser, IContactManagerForUser2
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
contactsSystem

Remarks

Call the ContactManager.GetForUser method to get an instance of this class.

Properties

SystemDisplayNameOrder SystemDisplayNameOrder SystemDisplayNameOrder SystemDisplayNameOrder

Gets or sets the display name order for contacts.

public : ContactNameOrder SystemDisplayNameOrder { get; set; }
public ContactNameOrder SystemDisplayNameOrder { get; set; }
Public ReadWrite Property SystemDisplayNameOrder As ContactNameOrder
var contactNameOrder = contactManagerForUser.systemDisplayNameOrder;
contactManagerForUser.systemDisplayNameOrder = contactNameOrder;
Value
ContactNameOrder ContactNameOrder ContactNameOrder ContactNameOrder

The display name order for contacts.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
contactsSystem

SystemSortOrder SystemSortOrder SystemSortOrder SystemSortOrder

Gets or sets the sort order for contacts. For example, sort by last name or first name.

public : ContactNameOrder SystemSortOrder { get; set; }
public ContactNameOrder SystemSortOrder { get; set; }
Public ReadWrite Property SystemSortOrder As ContactNameOrder
var contactNameOrder = contactManagerForUser.systemSortOrder;
contactManagerForUser.systemSortOrder = contactNameOrder;
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
contactsSystem

User User User User

Gets the User represented by this contact manager.

public : User User { get; }
public User User { get; }
Public ReadOnly Property User As User
var user = contactManagerForUser.user;
Value
User User User User

The User represented by this contact manager.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
contactsSystem

Methods

ConvertContactToVCardAsync(Contact) ConvertContactToVCardAsync(Contact) ConvertContactToVCardAsync(Contact) ConvertContactToVCardAsync(Contact)

Asynchronously converts a Contact to a vCard.

public : IAsyncOperation<RandomAccessStreamReference> ConvertContactToVCardAsync(Contact contact)
public IAsyncOperation<RandomAccessStreamReference> ConvertContactToVCardAsync(Contact contact)
Public Function ConvertContactToVCardAsync(contact As Contact) As IAsyncOperation( Of RandomAccessStreamReference )
Windows.ApplicationModel.Contacts.ContactManagerForUser.convertContactToVCardAsync(contact).done( /* Your success and error handlers */ );
Parameters
contact
Contact Contact Contact Contact

The Contact to convert.

Returns
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
contactsSystem
See Also

ConvertContactToVCardAsync(Contact, UInt32) ConvertContactToVCardAsync(Contact, UInt32) ConvertContactToVCardAsync(Contact, UInt32) ConvertContactToVCardAsync(Contact, UInt32)

Asynchronously converts a Contact to a vCard.

public : IAsyncOperation<RandomAccessStreamReference> ConvertContactToVCardAsync(Contact contact, unsigned int maxBytes)
public IAsyncOperation<RandomAccessStreamReference> ConvertContactToVCardAsync(Contact contact, UInt32 maxBytes)
Public Function ConvertContactToVCardAsync(contact As Contact, maxBytes As UInt32) As IAsyncOperation( Of RandomAccessStreamReference )
Windows.ApplicationModel.Contacts.ContactManagerForUser.convertContactToVCardAsync(contact, maxBytes).done( /* Your success and error handlers */ );
Parameters
contact
Contact Contact Contact Contact

The Contact to convert.

maxBytes
unsigned int UInt32 UInt32 UInt32

The maximum size for the vCard in bytes.

Returns
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
contactsSystem
See Also

ConvertVCardToContactAsync(IRandomAccessStreamReference) ConvertVCardToContactAsync(IRandomAccessStreamReference) ConvertVCardToContactAsync(IRandomAccessStreamReference) ConvertVCardToContactAsync(IRandomAccessStreamReference)

Asynchronously converts a vCard to a Contact.

public : IAsyncOperation<Contact> ConvertVCardToContactAsync(IRandomAccessStreamReference vCard)
public IAsyncOperation<Contact> ConvertVCardToContactAsync(IRandomAccessStreamReference vCard)
Public Function ConvertVCardToContactAsync(vCard As IRandomAccessStreamReference) As IAsyncOperation( Of Contact )
Windows.ApplicationModel.Contacts.ContactManagerForUser.convertvCardToContactAsync(vCard).done( /* Your success and error handlers */ );
Parameters
Returns
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
contactsSystem

RequestAnnotationStoreAsync(ContactAnnotationStoreAccessType) RequestAnnotationStoreAsync(ContactAnnotationStoreAccessType) RequestAnnotationStoreAsync(ContactAnnotationStoreAccessType) RequestAnnotationStoreAsync(ContactAnnotationStoreAccessType)

Asynchronously returns the ContactAnnotationStore from the system.

public : IAsyncOperation<ContactAnnotationStore> RequestAnnotationStoreAsync(ContactAnnotationStoreAccessType accessType)
public IAsyncOperation<ContactAnnotationStore> RequestAnnotationStoreAsync(ContactAnnotationStoreAccessType accessType)
Public Function RequestAnnotationStoreAsync(accessType As ContactAnnotationStoreAccessType) As IAsyncOperation( Of ContactAnnotationStore )
Windows.ApplicationModel.Contacts.ContactManagerForUser.requestAnnotationStoreAsync(accessType).done( /* Your success and error handlers */ );
Parameters
accessType
ContactAnnotationStoreAccessType ContactAnnotationStoreAccessType ContactAnnotationStoreAccessType ContactAnnotationStoreAccessType

Specifies the access type, such as AllAnnotationsReadWrite for all annotations or AppAnnotationsReadWrite for the calling app's annotations.

Returns
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
contactsSystem

RequestStoreAsync(ContactStoreAccessType) RequestStoreAsync(ContactStoreAccessType) RequestStoreAsync(ContactStoreAccessType) RequestStoreAsync(ContactStoreAccessType)

Asynchronously returns the ContactStore from the system.

public : IAsyncOperation<ContactStore> RequestStoreAsync(ContactStoreAccessType accessType)
public IAsyncOperation<ContactStore> RequestStoreAsync(ContactStoreAccessType accessType)
Public Function RequestStoreAsync(accessType As ContactStoreAccessType) As IAsyncOperation( Of ContactStore )
Windows.ApplicationModel.Contacts.ContactManagerForUser.requestStoreAsync(accessType).done( /* Your success and error handlers */ );
Parameters
accessType
ContactStoreAccessType ContactStoreAccessType ContactStoreAccessType ContactStoreAccessType

Specifies the access type, such as AllContactsReadOnly for all accounts or AppContactsReadWrite for the calling app's accounts.

Returns
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
contactsSystem

ShowFullContactCard(Contact, FullContactCardOptions) ShowFullContactCard(Contact, FullContactCardOptions) ShowFullContactCard(Contact, FullContactCardOptions) ShowFullContactCard(Contact, FullContactCardOptions)

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

public : void ShowFullContactCard(Contact contact, FullContactCardOptions fullContactCardOptions)
public void ShowFullContactCard(Contact contact, FullContactCardOptions fullContactCardOptions)
Public Function ShowFullContactCard(contact As Contact, fullContactCardOptions As FullContactCardOptions) As void
contactManagerForUser.showFullContactCard(contact, fullContactCardOptions);
Parameters
contact
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.

fullContactCardOptions
FullContactCardOptions FullContactCardOptions FullContactCardOptions FullContactCardOptions

Specifies how to display the full contact card.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)
Capabilities
contactsSystem

Remarks

This method must be called from the main UI thread.

See Also