ContactPicker.DesiredFields Property

Definition

Sets the contact fields your app is interested in.

Note

This property is no longer available starting with Windows 10.

public:
 property IVector<Platform::String ^> ^ DesiredFields { IVector<Platform::String ^> ^ get(); };
IVector<winrt::hstring> DesiredFields();
public IList<string> DesiredFields { get; }
var iVector = contactPicker.desiredFields;
Public ReadOnly Property DesiredFields As IList(Of String)

Property Value

IVector<String>

IList<String>

IVector<Platform::String>

IVector<winrt::hstring>

An array of strings that represent the field names your app is interested in.

Windows requirements

App capabilities
contactsSystem

Remarks

If you choose only one field with this method, a contact is considered a match if it has that field. If you choose multiple fields, a contact is considered a match if it has any of the fields.

When selecting fields, list them in order of preference. For example, if you want both phone numbers and email addresses, but prefer phone numbers, put the PhoneNumber field before the Email field.

To specify a specific field, use the KnownContactField class.

Applies to