ToastNotification.Failed | failed event

Applies to Windows and Windows Phone

Occurs when an error is caused when Windows attempts to raise a toast notification. Apps that are running subscribe to this event.

Syntax


function onFailed(eventArgs) { /* Your code */ }
 
// addEventListener syntax
toastNotification.addEventListener("failed", onFailed);
toastNotification.removeEventListener("failed", onFailed);
 
- or -

toastNotification.onfailed = onFailed;


Event information

Delegate TypedEventHandler<ToastNotification, ToastFailedEventArgs>

Remarks

The most common failure that you'll see when you raise a toast is a settings error, for instance a block on toast notifications for this user. We recommend that you call ToastNotifier.Setting before you call Show instead of handling that situation through this event.

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

ToastNotification
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