Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ToastNotifier.RemoveFromSchedule | removeFromSchedule method

Applies to Windows and Windows Phone

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

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

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

 

 

Show:
© 2014 Microsoft