4

I'm trying to get a complete list of all calendars. If I list

(new Appointments()).Accounts

I get only accounts like "Windows Live" or "Google". Actually I need a way to get the calendars and the appointments to that calendar inside the accounts. But it has to be on any account, not only the Live Account. Read only access is enough though. Is there any possibility?

If there is no chance, is this possible under WP8? Yes, I know, hardware capabilities were to high for this feature under WP7.8.

4

1 回答 1

2

Appointments.SearchAsync您应该使用一种方法。MSDN上有一个很好的例子:

        Appointments appts = new Appointments();

        appts.SearchCompleted += new EventHandler<AppointmentsSearchEventArgs>(Appointments_SearchCompleted);

        DateTime start = DateTime.Now;
        DateTime end = start.AddDays(7);

        appts.SearchAsync(start, end, "Appointments Test #1");

在回调函数中,您可以访问args.Resultstype IEnumerable<Appointment>

这在 WP7.1 和 WP8 上都可用。

于 2013-03-16T13:34:59.133 回答