Retrieving Appointments

The Appointments class allows you to retrieve appointments that fall between two specified dates.

Note

To access the user’s appointments, the ID_CAP_APPOINTMENTS capability must be present in the WMAppManifest.xml file.

For more information on the phone’s security capability model, see Chapter 2.

To query the user’s appointments, define an Appointments instance as a field in a class, as shown:

Appointments appointments;

Instantiate the Appointments object, subscribe to its SearchCompleted event, and then call SearchAsync. The following excerpt demonstrates the retrieval of appointments that fall within the next six months:

void SearchAppointments(){    appointments = new Appointments(); ...

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

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