ToastNotification.Failed Evento

Definición

Se produce cuando se produce un error cuando Windows intenta generar una notificación del sistema. Las aplicaciones que ejecutan se suscriben a este evento.

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

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

// Revoke with event_revoker
ToastNotification::Failed_revoker Failed(auto_revoke_t, TypedEventHandler<ToastNotification, ToastFailedEventArgs const&> const& handler) const;
public event TypedEventHandler<ToastNotification,ToastFailedEventArgs> Failed;
function onFailed(eventArgs) { /* Your code */ }
toastNotification.addEventListener("failed", onFailed);
toastNotification.removeEventListener("failed", onFailed);
- or -
toastNotification.onfailed = onFailed;
Public Custom Event Failed As TypedEventHandler(Of ToastNotification, ToastFailedEventArgs) 

Tipo de evento

Comentarios

El motivo del error del sistema se puede encontrar en la propiedad ErrorCode del parámetro ToastFailedEventArgs .

El error más común que verá al generar una notificación del sistema es un error de configuración , por ejemplo, un bloque en las notificaciones del sistema para este usuario. Se recomienda llamar a ToastNotifier.Setting antes de llamar a Show en lugar de controlar esa situación a través de este evento.

Se aplica a

Consulte también