ContactFieldFactory ContactFieldFactory ContactFieldFactory ContactFieldFactory ContactFieldFactory Class

Definition

Creates fields that contain information about a contact. You can then add these fields to a Contact object to create the contact. This class is available only to apps that support the Contact contract.

public : sealed class ContactFieldFactory : IContactFieldFactory, IContactInstantMessageFieldFactory, IContactLocationFieldFactory
struct winrt::Windows::ApplicationModel::Contacts::ContactFieldFactory : IContactFieldFactory, IContactInstantMessageFieldFactory, IContactLocationFieldFactory
public sealed class ContactFieldFactory : IContactFieldFactory, IContactInstantMessageFieldFactory, IContactLocationFieldFactory
Public NotInheritable Class ContactFieldFactory Implements IContactFieldFactory, IContactInstantMessageFieldFactory, IContactLocationFieldFactory
var contactFieldFactory = new contactFieldFactory();
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
contactsSystem

Constructors

ContactFieldFactory() ContactFieldFactory() ContactFieldFactory() ContactFieldFactory() ContactFieldFactory()

Note

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

Creates an instance of the ContactFieldFactory class.

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

Methods

CreateField(String, String, ContactFieldType, ContactFieldCategory) CreateField(String, String, ContactFieldType, ContactFieldCategory) CreateField(String, String, ContactFieldType, ContactFieldCategory) CreateField(String, String, ContactFieldType, ContactFieldCategory) CreateField(String, String, ContactFieldType, ContactFieldCategory)

Note

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

Creates a field to contain information about a contact.

public : ContactField CreateField(Platform::String name, Platform::String value, ContactFieldType type, ContactFieldCategory category)
ContactField CreateField(winrt::hstring name, winrt::hstring value, ContactFieldType type, ContactFieldCategory category) const;
public ContactField CreateField(String name, String value, ContactFieldType type, ContactFieldCategory category)
Public Function CreateField(name As String, value As String, type As ContactFieldType, category As ContactFieldCategory) As ContactField
var contactField = contactFieldFactory.createField(name, value, type, category);
Parameters
name
String String String

The name of the field.

value
String String String

The value of the field.

category
ContactFieldCategory ContactFieldCategory ContactFieldCategory

The category the field belongs to.

Returns

Contains a field that you can add to a Contact object.

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

CreateField(String, ContactFieldType) CreateField(String, ContactFieldType) CreateField(String, ContactFieldType) CreateField(String, ContactFieldType) CreateField(String, ContactFieldType)

Note

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

Creates a field to contain information about a contact.

public : ContactField CreateField(Platform::String value, ContactFieldType type)
ContactField CreateField(winrt::hstring value, ContactFieldType type) const;
public ContactField CreateField(String value, ContactFieldType type)
Public Function CreateField(value As String, type As ContactFieldType) As ContactField
var contactField = contactFieldFactory.createField(value, type);
Parameters
value
String String String

The value for the field.

Returns

Contains a field that you can add to a Contact object.

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

CreateField(String, ContactFieldType, ContactFieldCategory) CreateField(String, ContactFieldType, ContactFieldCategory) CreateField(String, ContactFieldType, ContactFieldCategory) CreateField(String, ContactFieldType, ContactFieldCategory) CreateField(String, ContactFieldType, ContactFieldCategory)

Note

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

Creates a field to contain information about a contact.

public : ContactField CreateField(Platform::String value, ContactFieldType type, ContactFieldCategory category)
ContactField CreateField(winrt::hstring value, ContactFieldType type, ContactFieldCategory category) const;
public ContactField CreateField(String value, ContactFieldType type, ContactFieldCategory category)
Public Function CreateField(value As String, type As ContactFieldType, category As ContactFieldCategory) As ContactField
var contactField = contactFieldFactory.createField(value, type, category);
Parameters
value
String String String

The value for the field.

category
ContactFieldCategory ContactFieldCategory ContactFieldCategory

The category the field belongs to.

Returns

Contains a field that you can add to a Contact object.

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

CreateInstantMessage(String) CreateInstantMessage(String) CreateInstantMessage(String) CreateInstantMessage(String) CreateInstantMessage(String)

Note

IContactInstantMessageFieldFactory may be altered or unavailable for releases after Windows 8.1. Instead, use ContactConnectedServiceAccount.

Creates a field to contain information about a contact's instant messaging account.

public : ContactInstantMessageField CreateInstantMessage(Platform::String userName)
ContactInstantMessageField CreateInstantMessage(winrt::hstring userName) const;
public ContactInstantMessageField CreateInstantMessage(String userName)
Public Function CreateInstantMessage(userName As String) As ContactInstantMessageField
var contactInstantMessageField = contactFieldFactory.createInstantMessage(userName);
Parameters
userName
String String String

The user name for the instant messaging account.

Returns

Contains an instant messaging field that you can add to a Contact object.

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

CreateInstantMessage(String, ContactFieldCategory) CreateInstantMessage(String, ContactFieldCategory) CreateInstantMessage(String, ContactFieldCategory) CreateInstantMessage(String, ContactFieldCategory) CreateInstantMessage(String, ContactFieldCategory)

Note

IContactInstantMessageFieldFactory may be altered or unavailable for releases after Windows 8.1. Instead, use ContactConnectedServiceAccount.

Creates a field to contain information about a contact's instant messaging account.

public : ContactInstantMessageField CreateInstantMessage(Platform::String userName, ContactFieldCategory category)
ContactInstantMessageField CreateInstantMessage(winrt::hstring userName, ContactFieldCategory category) const;
public ContactInstantMessageField CreateInstantMessage(String userName, ContactFieldCategory category)
Public Function CreateInstantMessage(userName As String, category As ContactFieldCategory) As ContactInstantMessageField
var contactInstantMessageField = contactFieldFactory.createInstantMessage(userName, category);
Parameters
userName
String String String

The user name for the instant messaging account.

category
ContactFieldCategory ContactFieldCategory ContactFieldCategory

The category the field belongs to.

Returns

Contains an instant messaging field that you can add to a Contact object.

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

CreateInstantMessage(String, ContactFieldCategory, String, String, Uri) CreateInstantMessage(String, ContactFieldCategory, String, String, Uri) CreateInstantMessage(String, ContactFieldCategory, String, String, Uri) CreateInstantMessage(String, ContactFieldCategory, String, String, Uri) CreateInstantMessage(String, ContactFieldCategory, String, String, Uri)

Note

IContactInstantMessageFieldFactory may be altered or unavailable for releases after Windows 8.1. Instead, use ContactConnectedServiceAccount.

Creates a field to contain information about a contact's instant messaging account.

public : ContactInstantMessageField CreateInstantMessage(Platform::String userName, ContactFieldCategory category, Platform::String service, Platform::String displayText, Uri verb)
ContactInstantMessageField CreateInstantMessage(winrt::hstring userName, ContactFieldCategory category, winrt::hstring service, winrt::hstring displayText, Uri verb) const;
public ContactInstantMessageField CreateInstantMessage(String userName, ContactFieldCategory category, String service, String displayText, Uri verb)
Public Function CreateInstantMessage(userName As String, category As ContactFieldCategory, service As String, displayText As String, verb As Uri) As ContactInstantMessageField
var contactInstantMessageField = contactFieldFactory.createInstantMessage(userName, category, service, displayText, verb);
Parameters
userName
String String String

The user name of the instant messaging account.

category
ContactFieldCategory ContactFieldCategory ContactFieldCategory

The category the field belongs to.

service
String String String

The name of the instant messaging service.

displayText
String String String

The text to display to prompt an instant messaging conversation.

verb
Uri Uri Uri

The Uniform Resource Identifier (URI) that starts an instant messaging conversation.

Returns

Contains an instant messaging field that you can add to a Contact object.

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

CreateLocation(String) CreateLocation(String) CreateLocation(String) CreateLocation(String) CreateLocation(String)

Note

IContactLocationFieldFactory may be altered or unavailable for releases after Windows 8.1. Instead, use ContactAddress.

Creates a field to contain information about a contact's location.

public : ContactLocationField CreateLocation(Platform::String unstructuredAddress)
ContactLocationField CreateLocation(winrt::hstring unstructuredAddress) const;
public ContactLocationField CreateLocation(String unstructuredAddress)
Public Function CreateLocation(unstructuredAddress As String) As ContactLocationField
var contactLocationField = contactFieldFactory.createLocation(unstructuredAddress);
Parameters
unstructuredAddress
String String String

The address of the contact in an unstructured format.

Returns

Contains a location field that you can add to a Contact object.

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

CreateLocation(String, ContactFieldCategory) CreateLocation(String, ContactFieldCategory) CreateLocation(String, ContactFieldCategory) CreateLocation(String, ContactFieldCategory) CreateLocation(String, ContactFieldCategory)

Note

IContactLocationFieldFactory may be altered or unavailable for releases after Windows 8.1. Instead, use ContactAddress.

Creates a field to contain information about a contact's location.

public : ContactLocationField CreateLocation(Platform::String unstructuredAddress, ContactFieldCategory category)
ContactLocationField CreateLocation(winrt::hstring unstructuredAddress, ContactFieldCategory category) const;
public ContactLocationField CreateLocation(String unstructuredAddress, ContactFieldCategory category)
Public Function CreateLocation(unstructuredAddress As String, category As ContactFieldCategory) As ContactLocationField
var contactLocationField = contactFieldFactory.createLocation(unstructuredAddress, category);
Parameters
unstructuredAddress
String String String

The address of the contact in an unstructured format.

category
ContactFieldCategory ContactFieldCategory ContactFieldCategory

The category the field belongs to.

Returns

Contains a location field that you can add to a Contact object.

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

CreateLocation(String, ContactFieldCategory, String, String, String, String, String) CreateLocation(String, ContactFieldCategory, String, String, String, String, String) CreateLocation(String, ContactFieldCategory, String, String, String, String, String) CreateLocation(String, ContactFieldCategory, String, String, String, String, String) CreateLocation(String, ContactFieldCategory, String, String, String, String, String)

Note

IContactLocationFieldFactory may be altered or unavailable for releases after Windows 8.1. Instead, use ContactAddress.

Creates a field to contain information about a contact's location.

public : ContactLocationField CreateLocation(Platform::String unstructuredAddress, ContactFieldCategory category, Platform::String street, Platform::String city, Platform::String region, Platform::String country, Platform::String postalCode)
ContactLocationField CreateLocation(winrt::hstring unstructuredAddress, ContactFieldCategory category, winrt::hstring street, winrt::hstring city, winrt::hstring region, winrt::hstring country, winrt::hstring postalCode) const;
public ContactLocationField CreateLocation(String unstructuredAddress, ContactFieldCategory category, String street, String city, String region, String country, String postalCode)
Public Function CreateLocation(unstructuredAddress As String, category As ContactFieldCategory, street As String, city As String, region As String, country As String, postalCode As String) As ContactLocationField
var contactLocationField = contactFieldFactory.createLocation(unstructuredAddress, category, street, city, region, country, postalCode);
Parameters
unstructuredAddress
String String String

The address of the contact in an unstructured format.

category
ContactFieldCategory ContactFieldCategory ContactFieldCategory

The category the field belongs to.

street
String String String

The street address for the address.

city
String String String

The name of the city for the address.

region
String String String

The name of the region for the address.

country
String String String

The name of the country for the address.

postalCode
String String String

The postal code for the address.

Returns

Contains a location field that you can add to a Contact object.

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