StoredContact 類別

定義

表示與自訂連絡人存放區相關聯的連絡人。

public ref class StoredContact sealed : IContactInformation2
/// [Windows.Foundation.Metadata.Activatable(Windows.Phone.PersonalInformation.IStoredContactFactory, 65536, "Windows.Phone.PhoneContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Phone.PhoneContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class StoredContact final : IContactInformation2
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Phone.PersonalInformation.IStoredContactFactory), 65536, "Windows.Phone.PhoneContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Phone.PhoneContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class StoredContact : IContactInformation2
function StoredContact(store, contact)
Public NotInheritable Class StoredContact
Implements IContactInformation2
繼承
Object Platform::Object IInspectable StoredContact
屬性
實作

Windows 需求

裝置系列
Windows Mobile Extension SDK (已於 10.0.10240.0 引進)
API contract
Windows.Phone.PhoneContract (已於 v1.0 引進)
應用程式功能
ID_CAP_CONTACTS [Windows Phone]

備註

您必須開啟應用程式的連絡人存放區,才能取得 StoredContact 物件。 若要使用尚未與存放區相關聯的連絡人資訊,或從 vCard 剖析連絡人資訊,請使用 ContactInformation 類別。

這些 API 會建立或取得 StoredContact 物件:

建構函式

StoredContact(ContactStore)

初始化 StoredContact 類別的新實例。

StoredContact(ContactStore, ContactInformation)

初始化 StoredContact 類別的新實例,並從提供的 ContactInformation 物件初始化屬性值。

屬性

DisplayName

取得或設定預存連絡人的顯示名稱。

DisplayPicture

取得預存連絡人的顯示圖片。

DisplayPictureDate

取得或設定建立或修改顯示圖片的日期。 用來依日期啟用顯示圖片的排序。

FamilyName

取得或設定預存連絡人的系列名稱。

GivenName

取得或設定預存連絡人的指定名稱。

HonorificPrefix

取得或設定預存連絡人的接受前置詞。

HonorificSuffix

取得或設定預存連絡人的接受尾碼。

Id

取得預存連絡人的本機識別碼。

RemoteId

取得預存連絡人的遠端識別碼。

Store

取得連絡人儲存所在的 ContactStore

方法

GetDisplayPictureAsync()

取得預存連絡人的顯示圖片。

GetExtendedPropertiesAsync()

取得預存連絡人的擴充屬性,做為名稱/值組的對應。

GetPropertiesAsync()

取得連絡人的已知屬性。

ReplaceExistingContactAsync(String)

將連絡人取代為目前連絡人的指定識別碼。

SaveAsync()

將連絡人的目前狀態儲存到連絡人存放區。

SetDisplayPictureAsync(IInputStream)

使用 IInputStream 物件設定連絡人的顯示圖片。

ToVcardAsync()

使用 vCard 3.0 版格式擷取連絡人的 vCard 標記法。

ToVcardAsync(VCardFormat)

使用指定的 vCard 格式擷取連絡人的 vCard 標記法。

適用於

另請參閱