当我尝试通过我的应用程序从设备日历中删除一个事件时,它显示错误
错误信息:
An exception of type 'System.UnauthorizedAccessException' occurred in mscorlib.ni.dll but was not handled in user code Additional information: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
请看下面我用于删除操作的代码
AppointmentStore appointmentStore = await AppointmentManager.RequestStoreAsync(AppointmentStoreAccessType.AppCalendarsReadWrite);
AppointmentCalendar sysCal = await appointmentStore.GetAppointmentCalendarAsync(dCalendarID);
await sysCal.DeleteAppointmentAsync(dCalendarEventID);
任何人对此有任何想法请帮助我。谢谢
最佳答案
您是否有权使用日历?在应用程序 list 文件 WMAppManifest.xml
中查找 ID_CAP_APPOINTMENTS
。
关于c# - 如何从 Windows Phone 8.1 中的设备日历中删除约会,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27171046/