ToastNotifier.GetScheduledToastNotifications 方法

定義

取得此應用程式已排程顯示之 ScheduledToastNotification 物件的集合。

重要

只有使用 WinRT 作為預設應用程式架構的應用程式才支援此方法。

public:
 virtual IVectorView<ScheduledToastNotification ^> ^ GetScheduledToastNotifications() = GetScheduledToastNotifications;
IVectorView<ScheduledToastNotification> GetScheduledToastNotifications();
public IReadOnlyList<ScheduledToastNotification> GetScheduledToastNotifications();
function getScheduledToastNotifications()
Public Function GetScheduledToastNotifications () As IReadOnlyList(Of ScheduledToastNotification)

傳回

系結至此通知通知的應用程式已排程顯示計時的排程快顯通知集合。

範例

下列範例顯示 GetScheduledToastNotifications 方法的使用方式。

var notifier = Notifications.ToastNotificationManager.createToastNotifier();
var scheduled = notifier.getScheduledToastNotifications();                    

for (var i = 0, len = scheduled.length; i < len; i++) {

    // The itemId value is the unique ScheduledTileNotification.Id assigned to the 
    // notification when it was created.
    if (scheduled[i].id === itemId) {
        notifier.removeFromSchedule(scheduled[i]);
    }
}

適用於