如何访问 windows phone 应用程序 8.0 中的联系人?

How to access contacts in windows phone app 8.0?

我有一个表格可以输入 phone 号码。

用户应该能够通过单击按钮select 从他的联系人列表中选择联系人。当用户 select 是联系人时,号码应显示在表单的文本框中..

有人可以帮我编写代码吗... 感谢任何形式的帮助......

using Microsoft.Phone.UserData;

是你要找的..

类似于:

private void ButtonContacts_Click(object sender, RoutedEventArgs e)
{
    Contacts cons = new Contacts();

    //Identify the method that runs after the asynchronous search completes.
    cons.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(Contacts_SearchCompleted);

    //Start the asynchronous search.
    cons.SearchAsync(String.Empty, FilterKind.None, "Contacts Test #1");
}

void Contacts_SearchCompleted(object sender, ContactsSearchEventArgs e)
{
    //Do something with the results.
    MessageBox.Show(e.Results.Count().ToString());
}

这方面的文档非常冗长:MSDN