@@ -613,6 +613,79 @@ By hosting WebView2, your app can capture screenshots and indicate which format
613613---
614614
615615
616+ <!-- ------------------------------ -->
617+ #### Control whether the screen capture UI is shown (ScreenCaptureStarting event)
618+
619+ The ` ScreenCaptureStarting ` event is raised whenever the WebView2 and/or iframe that corresponds to the ` CoreWebView2Frame ` (or to any of its descendant iframes) requests permission to use the Screen Capture API before the UI is shown. The app can then block the UI from being displayed, or allow the UI to be displayed.
620+
621+ ##### [ .NET/C#] ( #tab/dotnetcsharp )
622+
623+ * ` CoreWebView2 ` Class:
624+ * [ CoreWebView2.ScreenCaptureStarting Event] ( /dotnet/api/microsoft.web.webview2.core.corewebview2.screencapturestarting )
625+
626+ * ` CoreWebView2Frame ` Class:
627+ * [ CoreWebView2Frame.ScreenCaptureStarting Event] ( /dotnet/api/microsoft.web.webview2.core.corewebview2frame.screencapturestarting )
628+
629+ * ` CoreWebView2NonClientRegionKind ` Enum:
630+ * [ CoreWebView2NonClientRegionKind.Minimize] ( /dotnet/api/microsoft.web.webview2.core.corewebview2nonclientregionkind )
631+ * [ CoreWebView2NonClientRegionKind.Maximize] ( /dotnet/api/microsoft.web.webview2.core.corewebview2nonclientregionkind )
632+ * [ CoreWebView2NonClientRegionKind.Close] ( /dotnet/api/microsoft.web.webview2.core.corewebview2nonclientregionkind )
633+
634+ * [ CoreWebView2ScreenCaptureStartingEventArgs Class] ( /dotnet/api/microsoft.web.webview2.core.corewebview2screencapturestartingeventargs )
635+ * [ CoreWebView2ScreenCaptureStartingEventArgs.Cancel Property] ( /dotnet/api/microsoft.web.webview2.core.corewebview2screencapturestartingeventargs.cancel )
636+ * [ CoreWebView2ScreenCaptureStartingEventArgs.Handled Property] ( /dotnet/api/microsoft.web.webview2.core.corewebview2screencapturestartingeventargs.handled )
637+ * [ CoreWebView2ScreenCaptureStartingEventArgs.OriginalSourceFrameInfo Property] ( /dotnet/api/microsoft.web.webview2.core.corewebview2screencapturestartingeventargs.originalsourceframeinfo )
638+ * [ CoreWebView2ScreenCaptureStartingEventArgs.GetDeferral Method] ( /dotnet/api/microsoft.web.webview2.core.corewebview2screencapturestartingeventargs.getdeferral )
639+
640+ ##### [ WinRT/C#] ( #tab/winrtcsharp )
641+
642+ * ` CoreWebView2 ` Class:
643+ * [ CoreWebView2.ScreenCaptureStarting Event] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2#screencapturestarting )
644+
645+ * ` CoreWebView2Frame ` Class:
646+ * [ CoreWebView2Frame.ScreenCaptureStarting Event] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2frame#screencapturestarting )
647+
648+ * ` CoreWebView2NonClientRegionKind ` Enum:
649+ * [ CoreWebView2NonClientRegionKind.Minimize] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2nonclientregionkind )
650+ * [ CoreWebView2NonClientRegionKind.Maximize] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2nonclientregionkind )
651+ * [ CoreWebView2NonClientRegionKind.Close] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2nonclientregionkind )
652+
653+ * [ CoreWebView2ScreenCaptureStartingEventArgs Class] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2screencapturestartingeventargs )
654+ * [ CoreWebView2ScreenCaptureStartingEventArgs.Cancel Property] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2screencapturestartingeventargs )
655+ * [ CoreWebView2ScreenCaptureStartingEventArgs.Handled Property] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2screencapturestartingeventargs )
656+ * [ CoreWebView2ScreenCaptureStartingEventArgs.OriginalSourceFrameInfo Property] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2screencapturestartingeventargs )
657+ * [ CoreWebView2ScreenCaptureStartingEventArgs.GetDeferral Method] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2screencapturestartingeventargs )
658+
659+ ##### [ Win32/C++] ( #tab/win32cpp )
660+
661+ * [ ICoreWebView2_27] ( /microsoft-edge/webview2/reference/win32/icorewebview2_27 )
662+ * [ ICoreWebView2_27::add_ScreenCaptureStarting] ( /microsoft-edge/webview2/reference/win32/icorewebview2_27#add_screencapturestarting )
663+ * [ ICoreWebView2_27::remove_ScreenCaptureStarting] ( /microsoft-edge/webview2/reference/win32/icorewebview2_27#remove_screencapturestarting )
664+
665+ * [ ICoreWebView2Frame6] ( /microsoft-edge/webview2/reference/win32/icorewebview2frame6 )
666+ * [ ICoreWebView2Frame6::add_ScreenCaptureStarting] ( /microsoft-edge/webview2/reference/win32/icorewebview2frame6#add_screencapturestarting )
667+ * [ ICoreWebView2Frame6::remove_ScreenCaptureStarting] ( /microsoft-edge/webview2/reference/win32/icorewebview2frame6#remove_screencapturestarting )
668+
669+ * [ ICoreWebView2FrameScreenCaptureStartingEventHandler] ( /microsoft-edge/webview2/reference/win32/icorewebview2framescreencapturestartingeventhandler ) <!-- win32 only -->
670+
671+ * [ ICoreWebView2ScreenCaptureStartingEventArgs] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventargs )
672+ * [ ICoreWebView2ScreenCaptureStartingEventArgs::get_Cancel] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventargs#get_cancel )
673+ * [ ICoreWebView2ScreenCaptureStartingEventArgs::get_Handled] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventargs#get_handled )
674+ * [ ICoreWebView2ScreenCaptureStartingEventArgs::get_OriginalSourceFrameInfo] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventargs#get_originalsourceframeinfo )
675+ * [ ICoreWebView2ScreenCaptureStartingEventArgs::GetDeferral] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventargs#getdeferral )
676+ * [ ICoreWebView2ScreenCaptureStartingEventArgs::put_Cancel] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventargs#put_cancel )
677+ * [ ICoreWebView2ScreenCaptureStartingEventArgs::put_Handled] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventargs#put_handled )
678+
679+ * [ ICoreWebView2ScreenCaptureStartingEventHandler] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventhandler ) <!-- win32 only -->
680+
681+ * ` COREWEBVIEW2_NON_CLIENT_REGION_KIND ` enum:
682+ * [ COREWEBVIEW2_NON_CLIENT_REGION_KIND_MINIMIZE] ( /microsoft-edge/webview2/reference/win32/webview2-idl#corewebview2_non_client_region_kind )
683+ * [ COREWEBVIEW2_NON_CLIENT_REGION_KIND_MAXIMIZE] ( /microsoft-edge/webview2/reference/win32/webview2-idl#corewebview2_non_client_region_kind )
684+ * [ COREWEBVIEW2_NON_CLIENT_REGION_KIND_CLOSE] ( /microsoft-edge/webview2/reference/win32/webview2-idl#corewebview2_non_client_region_kind )
685+
686+ ---
687+
688+
616689<!-- ------------------------------ -->
617690#### Downloads
618691
0 commit comments