[英]Windows phone - C# - Retrieving contact email
In my application I have a button which you can click on to send an email with certain contents. 在我的应用程序中,我有一个按钮,您可以单击该按钮以发送包含某些内容的电子邮件。 However I would like to know how to choose an email contact from the phones contacts, through some sort of contact-picker? 但是我想知道如何通过某种联系人选择器从电话联系人中选择电子邮件联系人?
Is there any in-built contact-picker which I could use? 我可以使用任何内置的联系人选择器吗?
Thanks alot! 非常感谢!
You can use the EmailAddressChooserTask 您可以使用EmailAddressChooserTask
EmailAddressChooserTask eact = new EmailAddressChooserTask();
eact.Completed += eact_Completed;
eact.Show();
void eact_Completed(object sender, EmailResult e)
{
if (e.TaskResult == TaskResult.OK)
{
string selectedEmail = e.Email;
}
else
{
//nothing chosen
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.