ToastNotification.Failed イベント

定義

Windows がトースト通知を生成しようとしたときにエラーが発生したときに発生します。 実行中のアプリは、このイベントをサブスクライブします。

// 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) 

イベントの種類

注釈

トーストのエラーの理由は、ToastFailedEventArgs パラメーターの ErrorCode プロパティにあります。

トーストを発生させると発生する最も一般的なエラーは 、設定 エラーです。たとえば、このユーザーのトースト通知のブロックです。 このイベントを通じてその状況を処理するのではなく、Show を呼び出す前に ToastNotifier.Setting を呼び出することをお勧めします。

適用対象

こちらもご覧ください