我有這樣的代碼:爲什麼應該將電子郵件地址顯示爲Windows.ApplicationModel.Contacts.ContactField?
private async void ButtonSelectContact_OnTapped(object sender, TappedRoutedEventArgs e)
{
var contactPicker = new Windows.ApplicationModel.Contacts.ContactPicker
{
CommitButtonText = "Invite"
};
var contact = await contactPicker.PickSingleContactAsync();
if (contact != null)
{
textBoxPerson.Text = contact.Name;
textBoxEmail.Text = contact.Emails[0].ToString();
}
}
選擇聯繫人後..這工作得很好,只是,textBoxEmail.Text包含「Windows.ApplicationModel.Contacts.ContactField」(應該是像「rupertTpupkin @ kingOfComedy.com「)。