Jaa


ContactField Class

Definition

Describes a piece of contact data.

public ref class ContactField sealed : IContactField
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Contacts.IContactFieldFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ContactField final : IContactField
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Contacts.IContactFieldFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class ContactField final : IContactField
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Contacts.IContactFieldFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class ContactField : IContactField
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Contacts.IContactFieldFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class ContactField : IContactField
function ContactField(name, value, type, category)
Public NotInheritable Class ContactField
Implements IContactField
Inheritance
Object Platform::Object IInspectable ContactField
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)
App capabilities
contactsSystem

Remarks

Each time you create a Contact object, you get a Fields property. This property contains the data that relates to the contact. To populate a Contact object with data, you append the Fields object with one or more instances of ContactField.

At a minimum, a ContactField object must contain a string value and a ContactFieldType, which specifies whether the data is a phone number, email address, physical address, or something else. You can also add a ContactFieldCategory to differentiate between home, work, personal, or other data. You can also use a ContactField object to add custom fields to a Contact.

Constructors

ContactField(String, ContactFieldType, ContactFieldCategory)

Note

IContactFieldFactory may be altered or unavailable for releases after Windows 8.1. Instead, use ContactPhone or ContactEmail.

Creates a new ContactFieldobject.

ContactField(String, ContactFieldType)

Note

IContactFieldFactory may be altered or unavailable for releases after Windows 8.1. Instead, use ContactPhone or ContactEmail.

Creates a new ContactFieldobject.

ContactField(String, String, ContactFieldType, ContactFieldCategory)

Note

IContactFieldFactory may be altered or unavailable for releases after Windows 8.1. Instead, use ContactPhone or ContactEmail.

Creates a new ContactFieldobject.

Properties

Category

Gets the category for the contact data.

Note

ContactField may be altered or unavailable for releases after Windows 8.1. Instead, use ContactAddress, ContactPhone, ContactSignificantOther, Contact, ContactEmail, ContactConnectedServiceAccount, ContactWebsite, ContactJobInfo, or ContactDate.

Name

Note

ContactField may be altered or unavailable for releases after Windows 8.1. Instead, use ContactAddress, ContactPhone, ContactSignificantOther, Contact, ContactEmail, ContactConnectedServiceAccount, ContactWebsite, ContactJobInfo, or ContactDate.

Gets the name of the field.

Type

Note

ContactField may be altered or unavailable for releases after Windows 8.1. Instead, use ContactAddress, ContactPhone, ContactSignificantOther, Contact, ContactEmail, ContactConnectedServiceAccount, ContactWebsite, ContactJobInfo, or ContactDate.

Gets the contact field type for the data.

Value

Note

ContactField may be altered or unavailable for releases after Windows 8.1. Instead, use ContactAddress, ContactPhone, ContactSignificantOther, Contact, ContactEmail, ContactConnectedServiceAccount, ContactWebsite, ContactJobInfo, or ContactDate.

Gets the value of the contact data.

Applies to