@@ -6,7 +6,7 @@ ms.author: msedgedevrel
66ms.topic : conceptual
77ms.service : microsoft-edge
88ms.subservice : webview
9- ms.date : 10/21 /2024
9+ ms.date : 11/18 /2024
1010---
1111# Overview of WebView2 features and APIs
1212
@@ -468,6 +468,7 @@ The WebView2 control gives your app access to many browser features. You can mo
468468* [ Printing] ( #printing )
469469* [ Cookies] ( #cookies )
470470* [ Image capture] ( #image-capture )
471+ * [ Control whether the screen capture UI is shown] ( #control-whether-the-screen-capture-ui-is-shown )
471472* [ Downloads] ( #downloads )
472473* [ Save as] ( #save-as )
473474* [ Web notification handling] ( #web-notification-handling )
@@ -613,6 +614,79 @@ By hosting WebView2, your app can capture screenshots and indicate which format
613614---
614615
615616
617+ <!-- ---------- -->
618+ ###### Control whether the screen capture UI is shown
619+
620+ 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.
621+
622+ ##### [ .NET/C#] ( #tab/dotnetcsharp )
623+
624+ * ` CoreWebView2 ` Class:
625+ * [ CoreWebView2.ScreenCaptureStarting Event] ( /dotnet/api/microsoft.web.webview2.core.corewebview2.screencapturestarting )
626+
627+ * ` CoreWebView2Frame ` Class:
628+ * [ CoreWebView2Frame.ScreenCaptureStarting Event] ( /dotnet/api/microsoft.web.webview2.core.corewebview2frame.screencapturestarting )
629+
630+ * ` CoreWebView2NonClientRegionKind ` Enum:
631+ * [ CoreWebView2NonClientRegionKind.Minimize] ( /dotnet/api/microsoft.web.webview2.core.corewebview2nonclientregionkind )
632+ * [ CoreWebView2NonClientRegionKind.Maximize] ( /dotnet/api/microsoft.web.webview2.core.corewebview2nonclientregionkind )
633+ * [ CoreWebView2NonClientRegionKind.Close] ( /dotnet/api/microsoft.web.webview2.core.corewebview2nonclientregionkind )
634+
635+ * [ CoreWebView2ScreenCaptureStartingEventArgs Class] ( /dotnet/api/microsoft.web.webview2.core.corewebview2screencapturestartingeventargs )
636+ * [ CoreWebView2ScreenCaptureStartingEventArgs.Cancel Property] ( /dotnet/api/microsoft.web.webview2.core.corewebview2screencapturestartingeventargs.cancel )
637+ * [ CoreWebView2ScreenCaptureStartingEventArgs.Handled Property] ( /dotnet/api/microsoft.web.webview2.core.corewebview2screencapturestartingeventargs.handled )
638+ * [ CoreWebView2ScreenCaptureStartingEventArgs.OriginalSourceFrameInfo Property] ( /dotnet/api/microsoft.web.webview2.core.corewebview2screencapturestartingeventargs.originalsourceframeinfo )
639+ * [ CoreWebView2ScreenCaptureStartingEventArgs.GetDeferral Method] ( /dotnet/api/microsoft.web.webview2.core.corewebview2screencapturestartingeventargs.getdeferral )
640+
641+ ##### [ WinRT/C#] ( #tab/winrtcsharp )
642+
643+ * ` CoreWebView2 ` Class:
644+ * [ CoreWebView2.ScreenCaptureStarting Event] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2#screencapturestarting )
645+
646+ * ` CoreWebView2Frame ` Class:
647+ * [ CoreWebView2Frame.ScreenCaptureStarting Event] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2frame#screencapturestarting )
648+
649+ * ` CoreWebView2NonClientRegionKind ` Enum:
650+ * [ CoreWebView2NonClientRegionKind.Minimize] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2nonclientregionkind )
651+ * [ CoreWebView2NonClientRegionKind.Maximize] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2nonclientregionkind )
652+ * [ CoreWebView2NonClientRegionKind.Close] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2nonclientregionkind )
653+
654+ * [ CoreWebView2ScreenCaptureStartingEventArgs Class] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2screencapturestartingeventargs )
655+ * [ CoreWebView2ScreenCaptureStartingEventArgs.Cancel Property] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2screencapturestartingeventargs )
656+ * [ CoreWebView2ScreenCaptureStartingEventArgs.Handled Property] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2screencapturestartingeventargs )
657+ * [ CoreWebView2ScreenCaptureStartingEventArgs.OriginalSourceFrameInfo Property] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2screencapturestartingeventargs )
658+ * [ CoreWebView2ScreenCaptureStartingEventArgs.GetDeferral Method] ( /microsoft-edge/webview2/reference/winrt/microsoft_web_webview2_core/corewebview2screencapturestartingeventargs )
659+
660+ ##### [ Win32/C++] ( #tab/win32cpp )
661+
662+ * [ ICoreWebView2_27] ( /microsoft-edge/webview2/reference/win32/icorewebview2_27 )
663+ * [ ICoreWebView2_27::add_ScreenCaptureStarting] ( /microsoft-edge/webview2/reference/win32/icorewebview2_27#add_screencapturestarting )
664+ * [ ICoreWebView2_27::remove_ScreenCaptureStarting] ( /microsoft-edge/webview2/reference/win32/icorewebview2_27#remove_screencapturestarting )
665+
666+ * [ ICoreWebView2Frame6] ( /microsoft-edge/webview2/reference/win32/icorewebview2frame6 )
667+ * [ ICoreWebView2Frame6::add_ScreenCaptureStarting] ( /microsoft-edge/webview2/reference/win32/icorewebview2frame6#add_screencapturestarting )
668+ * [ ICoreWebView2Frame6::remove_ScreenCaptureStarting] ( /microsoft-edge/webview2/reference/win32/icorewebview2frame6#remove_screencapturestarting )
669+
670+ * [ ICoreWebView2FrameScreenCaptureStartingEventHandler] ( /microsoft-edge/webview2/reference/win32/icorewebview2framescreencapturestartingeventhandler ) <!-- win32 only -->
671+
672+ * [ ICoreWebView2ScreenCaptureStartingEventArgs] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventargs )
673+ * [ ICoreWebView2ScreenCaptureStartingEventArgs::get_Cancel] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventargs#get_cancel )
674+ * [ ICoreWebView2ScreenCaptureStartingEventArgs::get_Handled] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventargs#get_handled )
675+ * [ ICoreWebView2ScreenCaptureStartingEventArgs::get_OriginalSourceFrameInfo] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventargs#get_originalsourceframeinfo )
676+ * [ ICoreWebView2ScreenCaptureStartingEventArgs::GetDeferral] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventargs#getdeferral )
677+ * [ ICoreWebView2ScreenCaptureStartingEventArgs::put_Cancel] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventargs#put_cancel )
678+ * [ ICoreWebView2ScreenCaptureStartingEventArgs::put_Handled] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventargs#put_handled )
679+
680+ * [ ICoreWebView2ScreenCaptureStartingEventHandler] ( /microsoft-edge/webview2/reference/win32/icorewebview2screencapturestartingeventhandler ) <!-- win32 only -->
681+
682+ * ` COREWEBVIEW2_NON_CLIENT_REGION_KIND ` enum:
683+ * [ COREWEBVIEW2_NON_CLIENT_REGION_KIND_MINIMIZE] ( /microsoft-edge/webview2/reference/win32/webview2-idl#corewebview2_non_client_region_kind )
684+ * [ COREWEBVIEW2_NON_CLIENT_REGION_KIND_MAXIMIZE] ( /microsoft-edge/webview2/reference/win32/webview2-idl#corewebview2_non_client_region_kind )
685+ * [ COREWEBVIEW2_NON_CLIENT_REGION_KIND_CLOSE] ( /microsoft-edge/webview2/reference/win32/webview2-idl#corewebview2_non_client_region_kind )
686+
687+ ---
688+
689+
616690<!-- ------------------------------ -->
617691#### Downloads
618692
0 commit comments