1

可以将联系人过滤器类型替换为 cons.SearchAsync 中的联系人存储类型。
C#代码:

FilterKind contactFilterKind = FilterKind.None;
    StorageKind contactStorageKind = StorageKind.Phone;

        ContactResultsData.DataContext = this.DisplayedContacts;
        ContactResultsLabel.Text = "results are loading...";
        ContactResultsData.DataContext = null;



        Contacts cons = new Contacts();

       // ContactResultsData.DataContext = cons;
        cons.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(Contacts_SearchCompleted);

        cons.SearchAsync(contactFilterString.Text, contactFilterKind, "Contacts Test #1");
4

1 回答 1

0

@Chakravathy您不能用contactStorageKind替换contactFilterKind 因为 cons.SearchAsync 定义只接受FilterKind参数,所以它不能是其他任何东西..

于 2013-07-25T09:15:19.050 回答