My application needs an internal calendar. I can create a new calendar as follows:
var store = await AppointmentManager.RequestStoreAsync(AppointmentStoreAccessType.AppCalendarsReadWrite); var cacheCalendar = await store.CreateAppointmentCalendarAsync("unique name here");
It succeeds, and I get a new calendar. But this calendar is displayed in the built-in calendar application. I do not want this calendar to be visible, as it is intended for internal accounting.
So, I am trying to hide the calendar as follows:
var store = await AppointmentManager.RequestStoreAsync(AppointmentStoreAccessType.AppCalendarsReadWrite); var cacheCalendar = await store.CreateAppointmentCalendarAsync("unique name here"); cacheCalendar.IsHidden = true;
When calling SaveAsync , the following exception is thrown:
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) "
Why can't I hide my calendar from the phoneโs built-in calendar application? Is this an undocumented restriction? Are there other ways to do this?
(Note: I tested this on Windows 10 Mobile, as well as on the Win 10 desktop - the same error.)
Edit / Add . Since Anthony discovered that the IsHidden property IsHidden documented as read-only on MSDN, this is a screenshot from Visual Studio showing the public setter (which makes it compile, run, and seemingly the right to call):

(The application is intended for Win 10 Build 10586 - perhaps it is new, but unfinished?)
windows-10 uwp windows-10-universal windows-10-mobile uwp-xaml
Heinrich ulbricht
source share