Contact Contact Contact Contact Contact Class

Definition

Represents a contact.

public : sealed class Contact : IContact, IContact2, IContact3, IContactName
struct winrt::Windows::ApplicationModel::Contacts::Contact : IContact, IContact2, IContact3, IContactName
public sealed class Contact : IContact, IContact2, IContact3, IContactName
Public NotInheritable Class Contact Implements IContact, IContact2, IContact3, IContactName
var contact = new contact();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Examples

This code shows how your app can take an app-specific contact object and use it to create a Contact object. First, here's an example of an object that contains contact information.

    var sampleContacts = [
        {
            firstName: "Kim",
            lastName: "Abercrombie",
            image: "KimAbercrombie.jpg",
            personalEmail: "kim@contoso.com",
            homePhone: "921 555-0187",
            address: {
                full: "123 Main St, Redmond WA, 23456",
                street: "123 Main St",
                city: "Redmond",
                state: "WA",
                zipCode: "23456"
            },
            id: "49b0652e-8f39-48c5-853b-e5e94e6b8a11"
        }
];
function createContactForBasket(sampleContact) {

    // Transfer contact data to a Contact object
    var contact = new Windows.ApplicationModel.Contacts.Contact();
    contact.firstName = sampleContact.firstName;
    contact.lastName = sampleContact.lastName;
    contact.id = sampleContact.id;

    // Add the personal email address to the Contact object’s emails vector
    var personalEmail = new Windows.ApplicationModel.Contacts.ContactEmail();
    personalEmail.address = sampleContact.personalEmail;
    personalEmail.kind = Windows.ApplicationModel.Contacts.ContactEmailKind.personal;
    contact.emails.append(personalEmail);

    // Adds the home phone number to the Contact object’s phones vector
    var homePhone = new Windows.ApplicationModel.Contacts.ContactPhone();
    homePhone.number = sampleContact.homePhone;
    homePhone.kind = Windows.ApplicationModel.Contacts.ContactPhoneKind.home;
    contact.phones.append(homePhone);

    // Adds the address to the Contact object’s addresses vector
    var homeAddress = new Windows.ApplicationModel.Contacts.ContactAddress();
    homeAddress.streetAddress = sampleContact.address.street;
    homeAddress.locality = sampleContact.address.city;
    homeAddress.region = sampleContact.address.state;
    homeAddress.postalCode = sampleContact.address.zipCode;
    homeAddress.kind = Windows.ApplicationModel.Contacts.ContactAddressKind.home;
    contact.addresses.append(homeAddress);

    // Sets the thumbnail for the contact from path
    Windows.ApplicationModel.Package.current.installedLocation.getFileAsync(sampleContact.image).then(
          function (imageFile) {
                 var streamReference = Windows.Storage.Streams.RandomAccessStreamReference.createFromFile(imageFile);
                 contact.thumbnail = randomAccessStreamReference;
          });

    return contact;
}

Remarks

No matter how you store contact information in your app, you must be able to put that information into a Contact object. This way, other apps that allow users to select contacts can use your app and process the contact information it provides.

For info about how to manage contacts, see Managing contact cards and Managing contact cards .

Constructors

Contact() Contact() Contact() Contact() Contact()

Creates a new instance of the Contact class.

public : Contact()
Contact() const;
public Contact()
Public Sub New()
var contact = new contact();
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Properties

Addresses Addresses Addresses Addresses Addresses

Gets the contact addresses for a contact.

public : IVector<ContactAddress> Addresses { get; }
IVector<ContactAddress> Addresses();
public IList<ContactAddress> Addresses { get; }
Public ReadOnly Property Addresses As IList<ContactAddress>
var iList = contact.addresses;
Value
IList<ContactAddress> IList<ContactAddress> IList<ContactAddress>

An array of contact addresses for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

AggregateId AggregateId AggregateId AggregateId AggregateId

If this is a raw contact that is part of an aggregate contact, then this property identifies the parent aggregate.

public : Platform::String AggregateId { get; }
winrt::hstring AggregateId();
public string AggregateId { get; }
Public ReadOnly Property AggregateId As string
var string = contact.aggregateId;
Value
string string string

String value that identifies the parent aggregate contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

ConnectedServiceAccounts ConnectedServiceAccounts ConnectedServiceAccounts ConnectedServiceAccounts ConnectedServiceAccounts

Gets the connected service accounts for a contact.

public : IVector<ContactConnectedServiceAccount> ConnectedServiceAccounts { get; }
IVector<ContactConnectedServiceAccount> ConnectedServiceAccounts();
public IList<ContactConnectedServiceAccount> ConnectedServiceAccounts { get; }
Public ReadOnly Property ConnectedServiceAccounts As IList<ContactConnectedServiceAccount>
var iList = contact.connectedServiceAccounts;
Value
IList<ContactConnectedServiceAccount> IList<ContactConnectedServiceAccount> IList<ContactConnectedServiceAccount>

An array of connected service accounts for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

ContactListId ContactListId ContactListId ContactListId ContactListId

Gets a string that identifies the ContactList to which this contact is a member.

public : Platform::String ContactListId { get; }
winrt::hstring ContactListId();
public string ContactListId { get; }
Public ReadOnly Property ContactListId As string
var string = contact.contactListId;
Value
string string string

A string that identifies the ContactList to which this contact is a member.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

DataSuppliers DataSuppliers DataSuppliers DataSuppliers DataSuppliers

Gets the data suppliers for a contact. The maximum string length for each data supplier is 50 characters.

public : IVector<Platform::String> DataSuppliers { get; }
IVector<winrt::hstring> DataSuppliers();
public IList<string> DataSuppliers { get; }
Public ReadOnly Property DataSuppliers As IList<string>
var iList = contact.dataSuppliers;
Value
IList<string> IList<string> IList<string>

An array of data suppliers for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

DisplayName DisplayName DisplayName DisplayName DisplayName

Gets the display name for a contact.

Note

You can only access this property from a UI thread.

public : Platform::String DisplayName { get; }
winrt::hstring DisplayName();
public string DisplayName { get; }
Public ReadOnly Property DisplayName As string
var string = contact.displayName;
Value
string string string

The display name for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Remarks

Windows calculates the DisplayName property by using the values from the FirstName, MiddleName, and LastName properties if any are specified. If these values aren't available, Windows uses the Yomi (phonetic Japanese equivalent) name values (YomiGivenName and YomiFamilyName ). The calculation for DisplayName takes into account different locale hints such as script of the text in the names, resource context, and default user locale to determine the proper formatting template for the name.

DisplayNameOverride DisplayNameOverride DisplayNameOverride DisplayNameOverride DisplayNameOverride

Gets or sets the display that was manually entered by the user.

public : Platform::String DisplayNameOverride { get; set; }
winrt::hstring DisplayNameOverride(); void DisplayNameOverride(winrt::hstring displaynameoverride);
public string DisplayNameOverride { get; set; }
Public ReadWrite Property DisplayNameOverride As string
var string = contact.displayNameOverride;
contact.displayNameOverride = string;
Value
string string string

The display that was manually entered by the user.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

DisplayPictureUserUpdateTime DisplayPictureUserUpdateTime DisplayPictureUserUpdateTime DisplayPictureUserUpdateTime DisplayPictureUserUpdateTime

Gets or sets the last time the user updated their display picture.

public : DateTime DisplayPictureUserUpdateTime { get; set; }
DateTime DisplayPictureUserUpdateTime(); void DisplayPictureUserUpdateTime(DateTime displaypictureuserupdatetime);
public DateTimeOffset DisplayPictureUserUpdateTime { get; set; }
Public ReadWrite Property DisplayPictureUserUpdateTime As DateTimeOffset
var dateTimeOffset = contact.displayPictureUserUpdateTime;
contact.displayPictureUserUpdateTime = dateTimeOffset;
Value
DateTimeOffset DateTimeOffset DateTimeOffset

The last time the user updated their display picture.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Emails Emails Emails Emails Emails

Gets the email addresses for a contact.

public : IVector<ContactEmail> Emails { get; }
IVector<ContactEmail> Emails();
public IList<ContactEmail> Emails { get; }
Public ReadOnly Property Emails As IList<ContactEmail>
var iList = contact.emails;
Value
IList<ContactEmail> IList<ContactEmail> IList<ContactEmail>

An array of email addresses for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Fields Fields Fields Fields Fields

Note

Fields may be altered or unavailable for releases after Windows 8.1. Instead, use Phones, Emails, Addresses, or ConnectedServiceAccounts.

Sets the fields that contain information about a contact.

public : IVector<IContactField> Fields { get; }
IVector<IContactField> Fields();
public IList<IContactField> Fields { get; }
Public ReadOnly Property Fields As IList<IContactField>
var iList = contact.fields;
Value
IList<IContactField> IList<IContactField> IList<IContactField>

An array of fields containing information about a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Examples

These functions show how you can add different fields to a Contact object.

function appendField(fields, value, type, category) {
    if (value) {
        fields.append(new Windows.ApplicationModel.Contacts.ContactField(value, type, category));
    }
}
function appendEmail(fields, email, category) {
    // Adds a new email to the contact fields vector
    appendField(fields, email, Windows.ApplicationModel.Contacts.ContactFieldType.email, category);
}
function appendPhoneNumber(fields, phone, category) {
    // Adds a new phone number to the contact fields vector
    appendField(fields, phone, Windows.ApplicationModel.Contacts.ContactFieldType.phoneNumber, category);
}
function appendAddress(fields, address, category) {
    // Adds a new address to the contact fields vector
    if (address) {
        fields.append(new Windows.ApplicationModel.Contacts.ContactLocationField(
                        address.full, category, address.street, address.city, address.state, "", address.zipCode));
    }
}

Remarks

The ContactFieldCategory and ContactFieldType classes provide information about what kind of information you can put into a field.

FirstName FirstName FirstName FirstName FirstName

Gets and sets the first name for a contact. The maximum string length for the first name is 64 characters.

public : Platform::String FirstName { get; set; }
winrt::hstring FirstName(); void FirstName(winrt::hstring firstname);
public string FirstName { get; set; }
Public ReadWrite Property FirstName As string
var string = contact.firstName;
contact.firstName = string;
Value
string string string

The first name for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem
See Also

FullName FullName FullName FullName FullName

Gets the full name of the Contact.

public : Platform::String FullName { get; }
winrt::hstring FullName();
public string FullName { get; }
Public ReadOnly Property FullName As string
var string = contact.fullName;
Value
string string string

The full name of the Contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

HonorificNamePrefix HonorificNamePrefix HonorificNamePrefix HonorificNamePrefix HonorificNamePrefix

Gets and sets the honorific prefix for the name for a contact. The maximum string length for the honorific prefix is 32 characters.

public : Platform::String HonorificNamePrefix { get; set; }
winrt::hstring HonorificNamePrefix(); void HonorificNamePrefix(winrt::hstring honorificnameprefix);
public string HonorificNamePrefix { get; set; }
Public ReadWrite Property HonorificNamePrefix As string
var string = contact.honorificNamePrefix;
contact.honorificNamePrefix = string;
Value
string string string

The honorific prefix for the name for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Remarks

Common name prefixes are Ms, Miss, Mrs, Mr, Dr, and so on.

HonorificNameSuffix HonorificNameSuffix HonorificNameSuffix HonorificNameSuffix HonorificNameSuffix

Gets and sets the honorific suffix for the name for a contact. The maximum string length for the honorific suffix is 32 characters.

public : Platform::String HonorificNameSuffix { get; set; }
winrt::hstring HonorificNameSuffix(); void HonorificNameSuffix(winrt::hstring honorificnamesuffix);
public string HonorificNameSuffix { get; set; }
Public ReadWrite Property HonorificNameSuffix As string
var string = contact.honorificNameSuffix;
contact.honorificNameSuffix = string;
Value
string string string

The honorific suffix for the name for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Remarks

A suffix follows the contact's name and provides additional info about the contact, like an academic degree (M.D. for medical doctor).

Id Id Id Id Id

Gets and sets the identifier for a contact. The maximum string length for the identifier is 256 characters.

Note

The Id property must be set when you call AddContact, ContainsContact, or RemoveContact. If Id isn't set when you call AddContact, your app will fail. If Id isn't set when you call ContainsContact or RemoveContact, your app won't be able to find or remove the contact.

public : Platform::String Id { get; set; }
winrt::hstring Id(); void Id(winrt::hstring id);
public string Id { get; set; }
Public ReadWrite Property Id As string
var string = contact.id;
contact.id = string;
Value
string string string

The identifier for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

ImportantDates ImportantDates ImportantDates ImportantDates ImportantDates

Gets the important dates for a contact.

public : IVector<ContactDate> ImportantDates { get; }
IVector<ContactDate> ImportantDates();
public IList<ContactDate> ImportantDates { get; }
Public ReadOnly Property ImportantDates As IList<ContactDate>
var iList = contact.importantDates;
Value
IList<ContactDate> IList<ContactDate> IList<ContactDate>

An array of important dates for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

IsAggregate IsAggregate IsAggregate IsAggregate IsAggregate

Gets a Boolean value indicating of this is an aggregate Contact.

public : Platform::Boolean IsAggregate { get; }
bool IsAggregate();
public bool IsAggregate { get; }
Public ReadOnly Property IsAggregate As bool
var bool = contact.isAggregate;
Value
bool bool bool

Boolean value indicating of this is an aggregate Contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

IsDisplayPictureManuallySet IsDisplayPictureManuallySet IsDisplayPictureManuallySet IsDisplayPictureManuallySet IsDisplayPictureManuallySet

Gets a Boolean value indicating if the user manually set the picture for the Contact.

public : Platform::Boolean IsDisplayPictureManuallySet { get; }
bool IsDisplayPictureManuallySet();
public bool IsDisplayPictureManuallySet { get; }
Public ReadOnly Property IsDisplayPictureManuallySet As bool
var bool = contact.isDisplayPictureManuallySet;
Value
bool bool bool

True if the user manually set the picture, false if this is an aggregate contact and the picture was chosen from one of the raw child contacts.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

IsMe IsMe IsMe IsMe IsMe

Gets a Boolean value indicating if this Contact represents the user logged into the device.

public : Platform::Boolean IsMe { get; }
bool IsMe();
public bool IsMe { get; }
Public ReadOnly Property IsMe As bool
var bool = contact.isMe;
Value
bool bool bool

Boolean value indicating if this Contact represents the user logged into the device.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

JobInfo JobInfo JobInfo JobInfo JobInfo

Gets the job info items for a contact.

public : IVector<ContactJobInfo> JobInfo { get; }
IVector<ContactJobInfo> JobInfo();
public IList<ContactJobInfo> JobInfo { get; }
Public ReadOnly Property JobInfo As IList<ContactJobInfo>
var iList = contact.jobInfo;
Value
IList<ContactJobInfo> IList<ContactJobInfo> IList<ContactJobInfo>

An array of job info items for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

LargeDisplayPicture LargeDisplayPicture LargeDisplayPicture LargeDisplayPicture LargeDisplayPicture

Gets a large version of the display picture for the Contact.

public : IRandomAccessStreamReference LargeDisplayPicture { get; }
IRandomAccessStreamReference LargeDisplayPicture();
public IRandomAccessStreamReference LargeDisplayPicture { get; }
Public ReadOnly Property LargeDisplayPicture As IRandomAccessStreamReference
var iRandomAccessStreamReference = contact.largeDisplayPicture;
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

LastName LastName LastName LastName LastName

Gets and sets the last name for a contact. The maximum string length for the last name is 64 characters.

public : Platform::String LastName { get; set; }
winrt::hstring LastName(); void LastName(winrt::hstring lastname);
public string LastName { get; set; }
Public ReadWrite Property LastName As string
var string = contact.lastName;
contact.lastName = string;
Value
string string string

The last name for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem
See Also

MiddleName MiddleName MiddleName MiddleName MiddleName

Gets and sets the middle name for a contact. The maximum string length for the middle name is 64 characters.

public : Platform::String MiddleName { get; set; }
winrt::hstring MiddleName(); void MiddleName(winrt::hstring middlename);
public string MiddleName { get; set; }
Public ReadWrite Property MiddleName As string
var string = contact.middleName;
contact.middleName = string;
Value
string string string

The middle name for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem
See Also

Name Name Name Name Name

Note

Name may be altered or unavailable for releases after Windows 8.1. Instead, use FirstName.

Sets and gets the name of the contact.

public : Platform::String Name { get; set; }
winrt::hstring Name(); void Name(winrt::hstring name);
public string Name { get; set; }
Public ReadWrite Property Name As string
var string = contact.name;
contact.name = string;
Value
string string string

The name of the contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Examples

This example shows a function taking the name property and returning the first and last names of the contact.

function getFirstAndLastName(contact) {
    var name = contact.name;
    if (name.indexOf(" ") != -1) {
        var firstAndLast = name.split(" ");
        return {
            first: firstAndLast[0],
            last: firstAndLast[1]
        };
    } else {
        return null;
    }
}

Remarks

An app can set the name property to any value that matches the name of a contact. We recommend that you set this value to contain both the first and last names of the contact, if that information is available.

Nickname Nickname Nickname Nickname Nickname

Gets or sets the nickname for the Contact.

public : Platform::String Nickname { get; set; }
winrt::hstring Nickname(); void Nickname(winrt::hstring nickname);
public string Nickname { get; set; }
Public ReadWrite Property Nickname As string
var string = contact.nickname;
contact.nickname = string;
Value
string string string

The nickname for the Contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Notes Notes Notes Notes Notes

Gets and sets notes for a contact. The maximum string length for notes is 4096 characters.

public : Platform::String Notes { get; set; }
winrt::hstring Notes(); void Notes(winrt::hstring notes);
public string Notes { get; set; }
Public ReadWrite Property Notes As string
var string = contact.notes;
contact.notes = string;
Value
string string string

A string that contains notes for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Phones Phones Phones Phones Phones

Gets info about the phones for a contact.

public : IVector<ContactPhone> Phones { get; }
IVector<ContactPhone> Phones();
public IList<ContactPhone> Phones { get; }
Public ReadOnly Property Phones As IList<ContactPhone>
var iList = contact.phones;
Value
IList<ContactPhone> IList<ContactPhone> IList<ContactPhone>

An array of items that describe the phones for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

ProviderProperties ProviderProperties ProviderProperties ProviderProperties ProviderProperties

Gets the property set object for the contact. Note: This property is not persisted if set by an application.

public : IPropertySet ProviderProperties { get; }
IPropertySet ProviderProperties();
public IPropertySet ProviderProperties { get; }
Public ReadOnly Property ProviderProperties As IPropertySet
var iPropertySet = contact.providerProperties;
Value
IPropertySet IPropertySet IPropertySet

The IPropertySet interface for the property set object for the contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem
See Also

RemoteId RemoteId RemoteId RemoteId RemoteId

Gets or sets an ID that can be used by a service provider to access the Contact in their remote system.

public : Platform::String RemoteId { get; set; }
winrt::hstring RemoteId(); void RemoteId(winrt::hstring remoteid);
public string RemoteId { get; set; }
Public ReadWrite Property RemoteId As string
var string = contact.remoteId;
contact.remoteId = string;
Value
string string string

An ID that can be used by a service provider to access the Contact in their remote system.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

RingToneToken RingToneToken RingToneToken RingToneToken RingToneToken

Gets or puts the path to the ringtone file for the Contact.

public : Platform::String RingToneToken { get; set; }
winrt::hstring RingToneToken(); void RingToneToken(winrt::hstring ringtonetoken);
public string RingToneToken { get; set; }
Public ReadWrite Property RingToneToken As string
var string = contact.ringToneToken;
contact.ringToneToken = string;
Value
string string string

The path to the ringtone file for the Contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

SignificantOthers SignificantOthers SignificantOthers SignificantOthers SignificantOthers

Gets the significant others for a contact.

public : IVector<ContactSignificantOther> SignificantOthers { get; }
IVector<ContactSignificantOther> SignificantOthers();
public IList<ContactSignificantOther> SignificantOthers { get; }
Public ReadOnly Property SignificantOthers As IList<ContactSignificantOther>
var iList = contact.significantOthers;
Value
IList<ContactSignificantOther> IList<ContactSignificantOther> IList<ContactSignificantOther>

An array of significant others for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

SmallDisplayPicture SmallDisplayPicture SmallDisplayPicture SmallDisplayPicture SmallDisplayPicture

Gets a small version of the display picture for the Contact.

public : IRandomAccessStreamReference SmallDisplayPicture { get; }
IRandomAccessStreamReference SmallDisplayPicture();
public IRandomAccessStreamReference SmallDisplayPicture { get; }
Public ReadOnly Property SmallDisplayPicture As IRandomAccessStreamReference
var iRandomAccessStreamReference = contact.smallDisplayPicture;
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

SortName SortName SortName SortName SortName

Gets the name used to sort the contact.

public : Platform::String SortName { get; }
winrt::hstring SortName();
public string SortName { get; }
Public ReadOnly Property SortName As string
var string = contact.sortName;
Value
string string string

The name used to sort the contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

SourceDisplayPicture SourceDisplayPicture SourceDisplayPicture SourceDisplayPicture SourceDisplayPicture

Gets or sets the display picture for the Contact in its original size.

public : IRandomAccessStreamReference SourceDisplayPicture { get; set; }
IRandomAccessStreamReference SourceDisplayPicture(); void SourceDisplayPicture(IRandomAccessStreamReference sourcedisplaypicture);
public IRandomAccessStreamReference SourceDisplayPicture { get; set; }
Public ReadWrite Property SourceDisplayPicture As IRandomAccessStreamReference
var iRandomAccessStreamReference = contact.sourceDisplayPicture;
contact.sourceDisplayPicture = iRandomAccessStreamReference;
Value
IRandomAccessStreamReference IRandomAccessStreamReference IRandomAccessStreamReference

The display picture for the Contact in its original size.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Remarks

The SmallDisplayPicture, LargeDisplayPicture and Thumbnail are generated from this picture.

TextToneToken TextToneToken TextToneToken TextToneToken TextToneToken

Gets or puts the path to the audio file to play when an SMS/MMS message is received from the Contact.

public : Platform::String TextToneToken { get; set; }
winrt::hstring TextToneToken(); void TextToneToken(winrt::hstring texttonetoken);
public string TextToneToken { get; set; }
Public ReadWrite Property TextToneToken As string
var string = contact.textToneToken;
contact.textToneToken = string;
Value
string string string

The path to the audio file to play when an SMS/MMS message is received from the Contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Thumbnail Thumbnail Thumbnail Thumbnail Thumbnail

Gets or sets a thumbnail image that represents this contact.

public : IRandomAccessStreamReference Thumbnail { get; set; }
IRandomAccessStreamReference Thumbnail(); void Thumbnail(IRandomAccessStreamReference thumbnail);
public IRandomAccessStreamReference Thumbnail { get; set; }
Public ReadWrite Property Thumbnail As IRandomAccessStreamReference
var iRandomAccessStreamReference = contact.thumbnail;
contact.thumbnail = iRandomAccessStreamReference;
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Websites Websites Websites Websites Websites

Gets the Web sites for a contact.

public : IVector<ContactWebsite> Websites { get; }
IVector<ContactWebsite> Websites();
public IList<ContactWebsite> Websites { get; }
Public ReadOnly Property Websites As IList<ContactWebsite>
var iList = contact.websites;
Value
IList<ContactWebsite> IList<ContactWebsite> IList<ContactWebsite>

An array of Web sites for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

YomiDisplayName YomiDisplayName YomiDisplayName YomiDisplayName YomiDisplayName

Gets the Yomi (phonetic Japanese equivalent) display name for a contact.

public : Platform::String YomiDisplayName { get; }
winrt::hstring YomiDisplayName();
public string YomiDisplayName { get; }
Public ReadOnly Property YomiDisplayName As string
var string = contact.yomiDisplayName;
Value
string string string

The Yomi display name for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Remarks

Windows calculates the YomiDisplayName property by using the values from the YomiGivenName and YomiFamilyName properties. The calculation for YomiDisplayName takes into account different locale hints such as script of the text in the names, resource context, and default user locale to determine the proper formatting template for the name.

YomiFamilyName YomiFamilyName YomiFamilyName YomiFamilyName YomiFamilyName

Gets the Yomi (phonetic Japanese equivalent) family name for a contact. The maximum string length for the Yomi family name is 120 characters.

public : Platform::String YomiFamilyName { get; set; }
winrt::hstring YomiFamilyName(); void YomiFamilyName(winrt::hstring yomifamilyname);
public string YomiFamilyName { get; set; }
Public ReadWrite Property YomiFamilyName As string
var string = contact.yomiFamilyName;
contact.yomiFamilyName = string;
Value
string string string

The Yomi family name for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

YomiGivenName YomiGivenName YomiGivenName YomiGivenName YomiGivenName

Gets the Yomi (phonetic Japanese equivalent) given name for a contact. The maximum string length for the Yomi given name is 120 characters.

public : Platform::String YomiGivenName { get; set; }
winrt::hstring YomiGivenName(); void YomiGivenName(winrt::hstring yomigivenname);
public string YomiGivenName { get; set; }
Public ReadWrite Property YomiGivenName As string
var string = contact.yomiGivenName;
contact.yomiGivenName = string;
Value
string string string

The Yomi given name for a contact.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

See Also