CoreWebView2WindowControlsOverlay Class
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.
Provides methods and properties which allow you to enable and configure the WebView2 Window Controls Overlay. The Overlay is a region on the top right/left of the webview window which contains the caption buttons (minimize, maximize, restore, close). Enabling the Overlay allows for custom app title bars to be rendered completely inside the webview window.
This API is designed to be used in addition to the other non-client
region APIs and features. These include app-region: drag, and
IsNonClientRegionSupportEnabled.
public class CoreWebView2WindowControlsOverlay
type CoreWebView2WindowControlsOverlay = class
Public Class CoreWebView2WindowControlsOverlay
- Inheritance
-
CoreWebView2WindowControlsOverlay
Properties
| Name | Description |
|---|---|
| BackgroundColor |
The |
| Height |
The |
| IsEnabled |
The When this property is When using this you should configure your app window to not display its default window control buttons. You are responsible for creating a title bar for your app by using the available space to the left of the controls overlay. In doing so, you can utilize the IsNonClientRegionSupportEnabled API to enable draggable regions for your custom title bar. The Overlay buttons will cover the HTML content, and will prevent mouse interactions with any elements directly below it, so you should avoid placing content there. To that end, there are four CSS environment variables titlebar-area-x, titlebar-area-y, titlebar-area-width, titlebar-area-height defined to help you get the dimensions of the available titlebar area to the left of the overlay. Similarly the navigator object will contain a WindowControlsOverlay property which can be used to get the titlebar area as a rect, and listen for changes to the size of that area. |