如何在Windows 8中访问和修改联系人?
我在 Windows 8 中发现了一个新的联系人 API:http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.contacts%28v=VS.85%29.aspx
但是我无法了解如何列出所有联系人以及添加或删除联系人。
有什么提示吗?
I have found a new contacts API in Windows 8: http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.contacts%28v=VS.85%29.aspx
However I am unable to find out how to list all contacts and add or delete a contact.
Any hints?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
查看联系人选取器示例。您不能只是去修改联系人,您必须先让用户为您选择它们。这是通过 pickSingleContactAsync() 方法完成的。这将为您提供一个可以查询或修改的 ContactInformation 对象。
Check out the Contact Picker sample. You can't just go modify contacts, you have to have the user select them for you first. This is done with the pickSingleContactAsync() method. This gets you a ContactInformation object which you can query or modify.
联系人 让您的应用创建新联系人。仅当您的应用使用联系人合约时才可用。
PickMultipleContactsOperation 启动联系人选取器的用户界面以选择多个联系人。
PickSingleContactOperation 启动联系人选取器的用户界面以选择一个联系人单一联系人。
这三个类和/或方法将执行您想要的所有操作,除了删除合同,我希望不要将其暴露给应用程序。
请记住,文档和 API 尚未完成。
Contact Lets your app create a new contact. Available only if your app uses the Contact contract.
PickMultipleContactsOperation Launches the user interface of the Contact Picker to select multiple contacts.
PickSingleContactOperation Launches the user interface of the Contact Picker to select a single contact.
These three classes and/or methods will do everything you want except delete a contract, which I would hope is not exposed to an application.
Remember the documentation and API is not finished.