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.

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

Accepted answer
  1. Sam of Simple Samples 5,541 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;  
    }  
    
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

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