O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

Note

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required