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 a Contact’s Address Using the AddressChooserTask

The address chooser task is used to allow the user to provide your app with the street address of a contact. This task launches the built-in Contacts application so that the user can select a contact.

Note

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

If the user completes the task, an event is raised and the task’s Completed event handler receives an address in the result.

The sample for the AddressChooserTask consists of the AddressChooserTaskView page and AddressChooserTaskViewModel class.

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

readonly AddressChooserTask ...

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