Share via

Windows 10/11 calendar app API

Steven 21 Reputation points
2022-10-22T02:42:43.12+00:00

I'm interested in making a library that can list calendars, insert/modify/remove events from a calendar, and I was wondering if there is an api to access the calendars in the Calendar app similar to how it works in iOS and Android. I haven't seen any documentation for this.

Developer technologies | Universal Windows Platform (UWP)
0 comments No comments

Answer accepted by question author

Sam of Simple Samples 5,586 Reputation points
2022-10-22T20:05:33.947+00:00

Look at the classes in the Windows.ApplicationModel.Appointments Namespace. The following will get you started.

AppointmentStore appointmentStore = null;  
try  
{  
    appointmentStore = await AppointmentManager.RequestStoreAsync(AppointmentStoreAccessType.AllCalendarsReadOnly);  
}  
catch (Exception ex)  
{  
    CalendarBox.Text += $"RequestStoreAsync error: {ex.Message}";  
    return;  
}  
IReadOnlyList<AppointmentCalendar> appCalendars = null;  
try  
{  
    appCalendars = await appointmentStore.FindAppointmentCalendarsAsync();  
}  
catch (Exception ex)  
{  
    CalendarBox.Text += $"FindAppointmentCalendarsAsync error: {ex.Message}";  
    return;  
}  

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.