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

Saving a Contact to the Phone’s Contact List Using the SaveContactTask

The save contact task is used to enable a user to save a contact to the phone’s contact list. The SaveContactTask class contains 26 string properties such as FirstName, Company, and Website, which allow you to pass detailed information to the built-in Contacts app.

When the user finishes saving the contact, cancels out of the task, or an error occurs, the task’s Completed event is raised.

The sample for the SaveContactTask consists of the SaveContactTaskView page and the SaveContactTaskViewModel class.

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

readonly SaveContactTask saveContactTask = new SaveContactTask();

Subscribe to the SaveContactTask.Completed ...

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