Selecting an Email Address with the EmailAddressChooserTask

The email address chooser task launches the Windows Phone Contacts application and allows the user to select a contact. When the user completes the task, the Completed event is raised, and the event handler receives an EmailResult object that exposes a string containing the selected contact’s email address.


To query the user’s contact list, without requiring the user to select a contact, use the Contacts class, which is described later in this chapter.

The EmailAddressChooserTask should be defined as a field in your class, like so:

readonly EmailAddressChooserTask emailAddressChooserTask                                     = new EmailAddressChooserTask ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.