Bagikan melalui


ToastNotifier.GetScheduledToastNotifications Metode

Definisi

Mendapatkan koleksi objek ScheduledToastNotification yang telah dijadwalkan untuk ditampilkan oleh aplikasi ini.

Penting

Metode ini hanya didukung dalam aplikasi yang menggunakan WinRT sebagai kerangka kerja aplikasi default mereka.

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

Mengembalikan

Kumpulan pemberitahuan toast terjadwal yang terikat aplikasi ke pemberitahuan ini telah dijadwalkan untuk tampilan berwaktu.

Contoh

Contoh berikut menunjukkan penggunaan metode 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]);
    }
}

Berlaku untuk