This topic has not yet been rated - Rate this topic

ToastNotifier.RemoveFromSchedule | removeFromSchedule method

Cancels the scheduled display of a specified ScheduledToastNotification.

Important  This method cannot be used by desktop callers.

Syntax


toastNotifier.removeFromSchedule(scheduledToast);

Parameters

scheduledToast

Type: ScheduledToastNotification

The notification to remove from the schedule.

Remarks

If you want to cancel one or more scheduled toast notifications, you can use the GetScheduledToastNotifications method to get the full list.

Examples

The following example shows the use of the RemoveFromSchedule method.



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]);
    }
}

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

Windows.UI.Notifications
Windows::UI::Notifications [C++]

Metadata

Windows.winmd

See also

ToastNotifier
Toast notifications sample
Sending toast notifications from desktop apps sample
Toast XML schema
Toast notification overview
Quickstart: Sending a toast notification
Quickstart: Sending a toast push notification
Quickstart: Sending a toast notification from the desktop
Guidelines and checklist for toast notifications
How to handle activation from a toast notification
How to opt in for toast notifications
How to schedule a toast notification
How to enable desktop toast notifications through an AppUserModelID
The toast template catalog
Toast audio options

 

 

Build date: 12/4/2012

© 2013 Microsoft. All rights reserved.