ToastNotification.Failed ToastNotification.Failed ToastNotification.Failed ToastNotification.Failed ToastNotification.Failed Event


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

public : event TypedEventHandler<ToastNotification, ToastFailedEventArgs> Failed
// Register
event_token Failed(TypedEventHandler<ToastNotification, ToastFailedEventArgs> const& handler) const;

// Revoke with event_token
void Failed(event_token const& cookie) const;

// Revoke with event_revoker
Failed_revoker Failed(auto_revoke_t, TypedEventHandler<ToastNotification, ToastFailedEventArgs> const& handler) const;
public event TypedEventHandler<ToastNotification, ToastFailedEventArgs> Failed
Public Event Failed As TypedEventHandler (Of ToastNotification, ToastFailedEventArgs)
function onFailed(eventArgs){/* Your code */}

toastNotification.addEventListener("failed", onFailed);
toastNotification.removeEventListener("failed", onFailed);


The reason for the toast's failure can be found in the ErrorCode property of the ToastFailedEventArgs parameter.

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.

See also