StoredContact Class

Definition

Represents a contact associated with a custom contact store.

public ref class StoredContact sealed : IContactInformation2
/// [Windows.Foundation.Metadata.Activatable(Windows.Phone.PersonalInformation.IStoredContactFactory, 65536, "Windows.Phone.PhoneContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Phone.PhoneContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class StoredContact final : IContactInformation2
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Phone.PersonalInformation.IStoredContactFactory), 65536, "Windows.Phone.PhoneContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Phone.PhoneContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class StoredContact : IContactInformation2
function StoredContact(store, contact)
Public NotInheritable Class StoredContact
Implements IContactInformation2
Inheritance
Object IInspectable StoredContact
Attributes
Implements

Windows requirements

Device family
Windows Mobile Extension SDK (introduced in 10.0.10240.0)
API contract
Windows.Phone.PhoneContract (introduced in v1.0)
App capabilities
ID_CAP_CONTACTS [Windows Phone]

Remarks

You must open your app's contact store in order to obtain a StoredContact object. To work with contact information that is not yet associated with a store or to parse contact information from a vCard, use the ContactInformation class.

These APIs create or obtain a StoredContact object:

Constructors

StoredContact(ContactStore)

Initializes a new instance of the StoredContact class.

StoredContact(ContactStore, ContactInformation)

Initializes a new instance of the StoredContact class and initializes the property values from the provided ContactInformation object.

Properties

DisplayName

Gets or sets the display name of a stored contact.

DisplayPicture

Gets the display picture of a stored contact.

DisplayPictureDate

Gets or sets the date that a display picture was created or modified. Used to enable sorting of display pictures by date.

FamilyName

Gets or sets the family name of the stored contact.

GivenName

Gets or sets the given name of the stored contact.

HonorificPrefix

Gets or sets the honorific prefix of the stored contact.

HonorificSuffix

Gets or sets the honorific suffix of the stored contact.

Id

Gets the local identifier of the stored contact.

RemoteId

Gets the remote identifier of the stored contact.

Store

Gets the ContactStore in which the contact is stored.

Methods

GetDisplayPictureAsync()

Gets the display picture of a stored contact.

GetExtendedPropertiesAsync()

Gets the extended properties for a stored contact as an map of name/value pairs.

GetPropertiesAsync()

Gets the known properties for the contact.

ReplaceExistingContactAsync(String)

Replaces the contact with the specified ID with the current contact.

SaveAsync()

Saves the current state of the contact to the contact store.

SetDisplayPictureAsync(IInputStream)

Sets the display picture for a contact using an IInputStream object.

ToVcardAsync()

Retrieves a vCard representation of the contact using the vCard version 3.0 format.

ToVcardAsync(VCardFormat)

Retrieves a vCard representation of the contact using the specified vCard format.

Applies to

See also