ContactQueryOptions ContactQueryOptions ContactQueryOptions ContactQueryOptions Class

Definition

Represents query options for retrieving contacts using CreateContactQuery.

public : sealed class ContactQueryOptions : IContactQueryOptions
public sealed class ContactQueryOptions : IContactQueryOptions
Public NotInheritable Class ContactQueryOptions Implements IContactQueryOptions
var contactQueryOptions = new contactQueryOptions();
Attributes
Windows 10 requirements
Device family
Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Phone.PhoneContract (introduced v1)
Capabilities
ID_CAP_CONTACTS [Windows Phone]

Constructors

ContactQueryOptions() ContactQueryOptions() ContactQueryOptions() ContactQueryOptions()

Initializes a new instance of the ContactQueryOptions class.

public : ContactQueryOptions()
public ContactQueryOptions()
Public Sub New()
var contactQueryOptions = new contactQueryOptions();
Additional features and requirements
Device family
Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Phone.PhoneContract (introduced v1)
Capabilities
ID_CAP_CONTACTS [Windows Phone]

Properties

DesiredFields DesiredFields DesiredFields DesiredFields

Gets or sets the list of properties that should be returned with each contact.

public : IVector<Platform::String> DesiredFields { get; }
public IList<string> DesiredFields { get; }
Public ReadOnly Property DesiredFields As IList<string>
var iList = contactQueryOptions.desiredFields;
Value
IVector<Platform::String> IList<string> IList<string> IList<string>

The list of properties that should be returned with each contact.

Additional features and requirements
Device family
Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Phone.PhoneContract (introduced v1)
Capabilities
ID_CAP_CONTACTS [Windows Phone]

Remarks

The default set of fields are those that are properties of the StoredContact class. Additional field names should be specified using one of the properties of KnownContactProperties class.

OrderBy OrderBy OrderBy OrderBy

Gets or sets the field used to order the contact query results.

public : ContactQueryResultOrdering OrderBy { get; set; }
public ContactQueryResultOrdering OrderBy { get; set; }
Public ReadWrite Property OrderBy As ContactQueryResultOrdering
var contactQueryResultOrdering = contactQueryOptions.orderBy;
contactQueryOptions.orderBy = contactQueryResultOrdering;
Value
ContactQueryResultOrdering ContactQueryResultOrdering ContactQueryResultOrdering ContactQueryResultOrdering

The field used to order the contact query results, as a value of the enumeration.

Additional features and requirements
Device family
Windows Mobile Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Phone.PhoneContract (introduced v1)
Capabilities
ID_CAP_CONTACTS [Windows Phone]

Remarks

Generally, apps should use the SystemDefault ordering value. This will cause the results list to be ordered the same as when they are displayed in the built-in phone experience.

See Also