StoredContact
StoredContact
StoredContact
StoredContact
Class
Definition
Represents a contact associated with a custom contact store.
public : sealed class StoredContact : IContactInformation, IContactInformation2, IStoredContactpublic sealed class StoredContact : IContactInformation, IContactInformation2, IStoredContactPublic NotInheritable Class StoredContact Implements IContactInformation, IContactInformation2, IStoredContact// You can use this class in JavaScript.
- Attributes
| 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
You must open your app's contact store in order to obtain a StoredContact object. To work with contact information that is not yet associated with a store or to parse contact information from a vCard, use the ContactInformation class.
These APIs create or obtain a StoredContact object:
- ContactStore.CreateMeContactAsync
- ContactStore.FindContactByIdAsync
- ContactStore.FindContactByRemoteIdAsync
- ContactQueryResult.GetContactsAsync (returns a collection)
Constructors
StoredContact(ContactStore) StoredContact(ContactStore) StoredContact(ContactStore) StoredContact(ContactStore)
Initializes a new instance of the StoredContact class.
public : StoredContact(ContactStore store)public StoredContact(ContactStore store)Public Sub New(store As ContactStore)// You can use this method in JavaScript.
The contact store in which the contact should be created.
| Device family |
Windows Mobile Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Phone.PhoneContract (introduced v1)
|
| Capabilities |
ID_CAP_CONTACTS [Windows Phone]
|
- See Also
StoredContact(ContactStore, ContactInformation) StoredContact(ContactStore, ContactInformation) StoredContact(ContactStore, ContactInformation) StoredContact(ContactStore, ContactInformation)
Initializes a new instance of the StoredContact class and initializes the property values from the provided ContactInformation object.
public : StoredContact(ContactStore store, ContactInformation contact)public StoredContact(ContactStore store, ContactInformation contact)Public Sub New(store As ContactStore, contact As ContactInformation)// You can use this method in JavaScript.
The contact store in which the contact should be created.
The contact information object with which the new contact object properties will be initialized.
| Device family |
Windows Mobile Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Phone.PhoneContract (introduced v1)
|
| Capabilities |
ID_CAP_CONTACTS [Windows Phone]
|
- See Also
Properties
DisplayName DisplayName DisplayName DisplayName
Gets or sets the display name of a stored contact.
public : PlatForm::String DisplayName { get; set; }public string DisplayName { get; set; }Public ReadWrite Property DisplayName As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The display name of a contact.
| Device family |
Windows Mobile Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Phone.PhoneContract (introduced v1)
|
| Capabilities |
ID_CAP_CONTACTS [Windows Phone]
|
DisplayPicture DisplayPicture DisplayPicture DisplayPicture
Gets the display picture of a stored contact.
public : IRandomAccessStreamReference DisplayPicture { get; }public IRandomAccessStreamReference DisplayPicture { get; }Public ReadOnly Property DisplayPicture As IRandomAccessStreamReference// You can use this property in JavaScript.
- Value
- IRandomAccessStreamReference IRandomAccessStreamReference IRandomAccessStreamReference IRandomAccessStreamReference
A stream containing the image data.
| Device family |
Windows Mobile Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Phone.PhoneContract (introduced v1)
|
| Capabilities |
ID_CAP_CONTACTS [Windows Phone]
|
DisplayPictureDate DisplayPictureDate DisplayPictureDate DisplayPictureDate
Gets or sets the date that a display picture was created or modified. Used to enable sorting of display pictures by date.
public : DateTime DisplayPictureDate { get; set; }public DateTimeOffset DisplayPictureDate { get; set; }Public ReadWrite Property DisplayPictureDate As DateTimeOffset// You can use this property in JavaScript.
- Value
- DateTime DateTimeOffset DateTimeOffset DateTimeOffset
The date that a display picture was created or modified.
FamilyName FamilyName FamilyName FamilyName
Gets or sets the family name of the stored contact.
public : PlatForm::String FamilyName { get; set; }public string FamilyName { get; set; }Public ReadWrite Property FamilyName As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The family name of the contact.
| Device family |
Windows Mobile Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Phone.PhoneContract (introduced v1)
|
| Capabilities |
ID_CAP_CONTACTS [Windows Phone]
|
GivenName GivenName GivenName GivenName
Gets or sets the given name of the stored contact.
public : PlatForm::String GivenName { get; set; }public string GivenName { get; set; }Public ReadWrite Property GivenName As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The given name of the contact.
| Device family |
Windows Mobile Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Phone.PhoneContract (introduced v1)
|
| Capabilities |
ID_CAP_CONTACTS [Windows Phone]
|
HonorificPrefix HonorificPrefix HonorificPrefix HonorificPrefix
Gets or sets the honorific prefix of the stored contact.
public : PlatForm::String HonorificPrefix { get; set; }public string HonorificPrefix { get; set; }Public ReadWrite Property HonorificPrefix As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The honorific prefix of the contact.
| Device family |
Windows Mobile Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Phone.PhoneContract (introduced v1)
|
| Capabilities |
ID_CAP_CONTACTS [Windows Phone]
|
HonorificSuffix HonorificSuffix HonorificSuffix HonorificSuffix
Gets or sets the honorific suffix of the stored contact.
public : PlatForm::String HonorificSuffix { get; set; }public string HonorificSuffix { get; set; }Public ReadWrite Property HonorificSuffix As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The honorific suffix of the contact.
| Device family |
Windows Mobile Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Phone.PhoneContract (introduced v1)
|
| Capabilities |
ID_CAP_CONTACTS [Windows Phone]
|
Id Id Id Id
Gets the local identifier of the stored contact.
public : PlatForm::String Id { get; }public string Id { get; }Public ReadOnly Property Id As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The local identifier of the contact.
| 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
This identifier is assigned to the contact by the system. Your app can set a custom identifier by using the RemoteId property. Use this to associate contacts in the contact store with contacts in a remote, cloud-based contact store.
RemoteId RemoteId RemoteId RemoteId
Gets the remote identifier of the stored contact.
public : PlatForm::String RemoteId { get; set; }public string RemoteId { get; set; }Public ReadWrite Property RemoteId As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The remote identifier of the contact.
| 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
Use this property to associate the Id of the contact with the identifier used by a remote, cloud-based contact store. The value of this property must be stable and must be unique across all apps on the phone. Attempting to save a contact may fail if the RemoteId property is not unique on the phone.
- See Also
Store Store Store Store
Gets the ContactStore in which the contact is stored.
public : ContactStore Store { get; }public ContactStore Store { get; }Public ReadOnly Property Store As ContactStore// You can use this property in JavaScript.
The ContactStore in which the contact is stored.
| Device family |
Windows Mobile Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Phone.PhoneContract (introduced v1)
|
| Capabilities |
ID_CAP_CONTACTS [Windows Phone]
|
Methods
GetDisplayPictureAsync() GetDisplayPictureAsync() GetDisplayPictureAsync() GetDisplayPictureAsync()
Gets the display picture of a stored contact.
public : IAsyncOperation<IRandomAccessStream> GetDisplayPictureAsync()public IAsyncOperation<IRandomAccessStream> GetDisplayPictureAsync()Public Function GetDisplayPictureAsync() As IAsyncOperation( Of IRandomAccessStream )// You can use this method in JavaScript.
An asynchronous operation that returns an IRandomAccessStream object on successful completion. If you use Asynchronous programming, the result type is IRandomAccessStream. This is the image source file as a bitmap stream.
| Device family |
Windows Mobile Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Phone.PhoneContract (introduced v1)
|
| Capabilities |
ID_CAP_CONTACTS [Windows Phone]
|
- See Also
GetExtendedPropertiesAsync() GetExtendedPropertiesAsync() GetExtendedPropertiesAsync() GetExtendedPropertiesAsync()
Gets the extended properties for a stored contact as an map of name/value pairs.
public : IAsyncOperation<IMap<PlatForm::String, PlatForm::Object>> GetExtendedPropertiesAsync()public IAsyncOperation<IDictionary<string, object>> GetExtendedPropertiesAsync()Public Function GetExtendedPropertiesAsync() As IAsyncOperation( Of IDictionarystring, object )// You can use this method in JavaScript.
When this method completes, it returns a map/dictionary of name/value pairs (string name, untyped values). If you use Asynchronous programming, the result type is a map or dictionary of these key-value pairs, keyed by string names. (You can use APIs of IMap<Platform::String,Platform::Object> for C++, APIs of IDictionary
| 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
In the current release, the values stored in the collection returned by this method must be strings. The key names are app-defined and are not used by the operating system at all. To get the values for common properties, such as a contact address or telephone numbers that are used by the operating system, use GetPropertiesAsync instead. The contents of the extended properties collection is saved when SaveAsync is called.
- See Also
GetPropertiesAsync() GetPropertiesAsync() GetPropertiesAsync() GetPropertiesAsync()
Gets the known properties for the contact.
public : IAsyncOperation<IMap<PlatForm::String, PlatForm::Object>> GetPropertiesAsync()public IAsyncOperation<IDictionary<string, object>> GetPropertiesAsync()Public Function GetPropertiesAsync() As IAsyncOperation( Of IDictionarystring, object )// You can use this method in JavaScript.
When this method completes, it returns a map/dictionary of name/value pairs (string name, untyped values). If you use Asynchronous programming, the result type is a map or dictionary of these key-value pairs, keyed by string names. (You can use APIs of IMap<Platform::String,Platform::Object> for C++, APIs of IDictionary
| 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 key names must be one of the properties of the KnownContactProperties class. To get values for arbitrary app-defined properties, use GetExtendedPropertiesAsync instead. The contents of the collection is saved when SaveAsync is called.
- See Also
ReplaceExistingContactAsync(String) ReplaceExistingContactAsync(String) ReplaceExistingContactAsync(String) ReplaceExistingContactAsync(String)
Replaces the contact with the specified ID with the current contact.
public : IAsyncAction ReplaceExistingContactAsync(PlatForm::String id)public IAsyncAction ReplaceExistingContactAsync(String id)Public Function ReplaceExistingContactAsync(id As String) As IAsyncAction// You can use this method in JavaScript.
- id
- PlatForm::String String String String
The ID of the contact to replace.
An asynchronous action. If you use Asynchronous programming, the result type is void.
| Device family |
Windows Mobile Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Phone.PhoneContract (introduced v1)
|
| Capabilities |
ID_CAP_CONTACTS [Windows Phone]
|
- See Also
SaveAsync() SaveAsync() SaveAsync() SaveAsync()
Saves the current state of the contact to the contact store.
public : IAsyncAction SaveAsync()public IAsyncAction SaveAsync()Public Function SaveAsync() As IAsyncAction// You can use this method in JavaScript.
An asynchronous action. If you use Asynchronous programming, the result type is void.
| Device family |
Windows Mobile Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Phone.PhoneContract (introduced v1)
|
| Capabilities |
ID_CAP_CONTACTS [Windows Phone]
|
- See Also
SetDisplayPictureAsync(IInputStream) SetDisplayPictureAsync(IInputStream) SetDisplayPictureAsync(IInputStream) SetDisplayPictureAsync(IInputStream)
Sets the display picture for a contact using an IInputStream object.
public : IAsyncAction SetDisplayPictureAsync(IInputStream stream)public IAsyncAction SetDisplayPictureAsync(IInputStream stream)Public Function SetDisplayPictureAsync(stream As IInputStream) As IAsyncAction// You can use this method in JavaScript.
The stream containing the image data.
An asynchronous action. If you use Asynchronous programming, the result type is void.
| Device family |
Windows Mobile Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Phone.PhoneContract (introduced v1)
|
| Capabilities |
ID_CAP_CONTACTS [Windows Phone]
|
- See Also
ToVcardAsync() ToVcardAsync() ToVcardAsync() ToVcardAsync()
Retrieves a vCard representation of the contact using the vCard version 3.0 format.
public : IAsyncOperation<IRandomAccessStream> ToVcardAsync()public IAsyncOperation<IRandomAccessStream> ToVcardAsync()Public Function ToVcardAsync() As IAsyncOperation( Of IRandomAccessStream )// You can use this method in JavaScript.
When this method completes, it returns a stream containing the vCard data. If you use Asynchronous programming, the result type is IRandomAccessStream, which is the data.
| Device family |
Windows Mobile Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Phone.PhoneContract (introduced v1)
|
| Capabilities |
ID_CAP_CONTACTS [Windows Phone]
|
- See Also
ToVcardAsync(VCardFormat) ToVcardAsync(VCardFormat) ToVcardAsync(VCardFormat) ToVcardAsync(VCardFormat)
Retrieves a vCard representation of the contact using the specified vCard format.
public : IAsyncOperation<IRandomAccessStream> ToVcardAsync(VCardFormat format)public IAsyncOperation<IRandomAccessStream> ToVcardAsync(VCardFormat format)Public Function ToVcardAsync(format As VCardFormat) As IAsyncOperation( Of IRandomAccessStream )// You can use this method in JavaScript.
The format that the returned vCard will use.
When this method completes, it returns a stream containing the vCard data. If you use Asynchronous programming, the result type is IRandomAccessStream, which is the data.
| Device family |
Windows Mobile Extension SDK (introduced v10.0.10240.0)
|
| API contract |
Windows.Phone.PhoneContract (introduced v1)
|
| Capabilities |
ID_CAP_CONTACTS [Windows Phone]
|
- See Also