wp8:从ScheduledActionService中删除所有内容

时间:2014-02-19 14:42:39

标签: windows-phone-8 alarm scheduledactionservice

如何从ScheduledActionService删除所有闹钟?

ScheduledActionService.remove()方法要求名称也find()

1 个答案:

答案 0 :(得分:1)

List<ScheduledNotification> notifications = ScheduledActionService.GetActions<ScheduledNotification>().ToList();
foreach (ScheduledNotification notification in notifications)
{
    ScheduledActionService.Remove(notification.Name);
}