Share via


ContactInformation Class

Definition

Represents a contact without an association to a contact store.

public ref class ContactInformation sealed : IContactInformation
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Phone.PhoneContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Phone.PhoneContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ContactInformation final : IContactInformation
[Windows.Foundation.Metadata.Activatable(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 ContactInformation : IContactInformation
function ContactInformation()
Public NotInheritable Class ContactInformation
Implements IContactInformation
Inheritance
Object Platform::Object IInspectable ContactInformation
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

This class is used to store information about a contact. It has a set of commonly used built-in properties like a family name and a description, and it also allows you to store custom properties as name/value pairs. The StoredContact class shares all of these properties but it requires you to open your app's custom contact store before you can obtain an instance of the class. Many applications will use StoredContact directly and never need to use ContactInformation. If you need to temporarily store contact information without opening your contact store or if you need to parse contact information from a vCard using ParseVcardAsync, you can use ContactInformation and then pass the object to the StoredContact constructor.

Constructors

ContactInformation()

Initializes a new instance of the ContactInformation class.

Properties

DisplayName

Gets or sets the display name of a contact.

DisplayPicture

Gets the display picture of a contact.

FamilyName

Gets or sets the family name of a contact.

GivenName

Gets or sets the given name of a contact.

HonorificPrefix

Gets or sets the honorific prefix of a contact.

HonorificSuffix

Gets or sets the honorific suffix of a contact.

Methods

GetDisplayPictureAsync()

Gets the display picture of a contact.

GetPropertiesAsync()

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

ParseVcardAsync(IInputStream)

Parses a vCard from a stream and returns a populated ContactInformation object.

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