1

このサンプルからスケジュールされたトースト通知を行う方法を知っていました http://code.msdn.microsoft.com/windowsapps/Schedules-Toast-notificatio-457e599b#content

しかし、今私がやりたいことは、作成されたトーストを削除する方法を知ることです。このコードを試しましたが、機能しません

IReadOnlyList<ScheduledToastNotification> scheduled =
    ToastNotificationManager.CreateToastNotifier().GetScheduledToastNotifications();

foreach (ScheduledToastNotification notify in scheduled)
{
    if (notify.Id == id)
    {
        ToastNotificationManager.CreateToastNotifier().RemoveFromSchedule(notify);
    }
}
4

2 に答える 2

1

Clear メソッドを使用して、スケジュールされたタイル通知を削除できます。詳細は、スケジュールされたすべてのタイル通知から TileUpdateManager をリセットする方法を参照してください。

于 2013-03-06T23:20:28.287 に答える