具有参与者的约会在查询是否使用appointment.Invitees属性时始终返回空集合。
这就是我要做的,
var calendarStore = await AppointmentManager.RequestStoreAsync(AppointmentStoreAccessType.AllCalendarsReadOnly);
var appointments = await calendarStore.FindAppointmentsAsync(DateTimeOffset.Now, TimeSpan.FromDays(30), new FindAppointmentsOptions() { IncludeHidden = true });
foreach (var appointment in appointments)
{
// appointment.Invitees is always null, even for appointments that has some!
foreach (var invitee in appointment.Invitees)
{
// do something here...
}
}我尝试在约会之外添加联系人功能,但徒劳无功。有没有想过为什么会有这么奇怪的行为?
发布于 2017-10-16 16:23:55
访问Invitees属性时,appointmentsSystem功能是必需的。
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap mp rescap">
<Capabilities>
<Capability Name="internetClient"/>
<uap:Capability Name="appointments" />
<uap:Capability Name="contacts" />
<rescap:Capability Name="appointmentsSystem" />
</Capabilities>任何人都不能请求访问此功能以提交商店
请注意,appointmentsSystem在商店应用程序中是无用的。
https://stackoverflow.com/questions/46726927
复制相似问题