c# – AppointmentManager.RequestStoreAsync在Windows Phone中
发布时间:2020-12-15 20:53:42 所属栏目:百科 来源:网络整理
导读:我试图从 Windows Phone日历访问约会 public async Task AppointmentStore getAppointments() { AppointmentStore appointmentStore = await AppointmentManager.RequestStoreAsync(AppointmentStoreAccessType.AllCalendarsReadOnly); return appointmentSt
我试图从
Windows Phone日历访问约会
public async Task <AppointmentStore> getAppointments() { AppointmentStore appointmentStore = await AppointmentManager.RequestStoreAsync(AppointmentStoreAccessType.AllCalendarsReadOnly); return appointmentStore; } 我已经在PackageManifest文件的Capabilities选项卡中“启用”了“约会”.在堆栈溢出的其他解决方案中,建议启用我所做的所需权限.我还以管理员身份运行Visual Studio.但是,系统继续抛出相同的未授权访问异常. 解决方法
使用AppointmentStoreAccessType.AppCalendarsReadWrite时,不会引发任何异常.
使用AppointmentStoreAccessType.AllCalendarsReadOnly会抛出未经授权的异常.哪个没有害处,不会让应用程序崩溃.这只是意味着您没有ChangeTracker属性. 您仍然可以使用appointmentStore对象并获取约会和其他内容列表.检查截图. 我希望你现在可以继续你的项目了吗? (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |