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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.