Compartilhar via


CoreWebView2NotificationReceivedEventArgs.Handled Property

Definition

Sets whether the NotificationReceived is handled by the host after the event handler completes or if there is a deferral then after the deferral is completed.

public bool Handled { get; set; }
member this.Handled : bool with get, set
Public Property Handled As Boolean

Property Value

Remarks

If Handled is set to true then WebView will not display the notification with the default UI, and the host will be responsible for handling the notification and for letting the web content know that the notification has been displayed, clicked, or closed. You must set Handled to true before you call ReportShown(), ReportClicked() and ReportClosed(), otherwise they will fail with HRESULT_FROM_WIN32(ERROR_INVALID_STATE). If after the event handler or deferral completes Handled is set to false then WebView will display the default notification UI. Note that you cannot un-handle this event once you have set Handled to be true. The initial value is false.

Applies to