CoreWebView2ScreenCaptureStartingEventArgs.Handled Property

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

By default, both the ScreenCaptureStarting event handlers on the CoreWebView2Frame and the CoreWebView2 will be invoked, with the CoreWebView2Frame event handlers invoked first. The host may set this flag to TRUE within the CoreWebView2Frame event handlers to prevent the remaining CoreWebView2 event handlers from being invoked. If the flag is set to FALSE within the CoreWebView2Frame event handlers, downstream handlers can update the Cancel property.

If a deferral is taken on the event args, then you must synchronously set Handled to TRUE prior to taking your deferral to prevent the CoreWebView2Frames event handlers from being invoked.

C#
public bool Handled { get; set; }

Property Value

Remarks

By default, both the ScreenCaptureStarting event handlers on the CoreWebView2Frame and the CoreWebView2 will be invoked, with the CoreWebView2Frame event handlers invoked first. The host may set this flag to TRUE within the CoreWebView2Frame event handlers to prevent the remaining CoreWebView2 event handlers from being invoked. If the flag is set to FALSE within the CoreWebView2Frame event handlers, downstream handlers can update the Cancel property.

Applies to

Producto Versiones
WebView2 .NET 1.0.2903.40, 1.0.2957.106, 1.0.3065.39
WebView2 .NET Prerelease 1.0.2646, 1.0.2730, 1.0.2783, 1.0.2839, 1.0.2895, 1.0.2950, 1.0.3079, 1.0.3116