Add contact to users contaclist in aWindows 8 Metr

2019-02-22 09:08发布

I'm creating a Windows 8 Metro App with c#

In the app you can search persons in a phonebook. Is there a possibility to add a found contact to the users contact-list?

I know you can browse the contacts with the Windows.ApplicationModel.Contacts.Provider, but I can't see how you can add a contact.

thanks for help

1条回答
叛逆
2楼-- · 2019-02-22 09:42

You can do so through the Contact Picker Contract. Use ContactPickerUI.AddContact. This will bring up a UI that the user can use to add the Contact you hand it. You cannot add a Contact without bringing up a Contact Picker UI. The Contact Sample gives an example of adding a contact.

查看更多
登录 后发表回答