Table of Contents

Class CoreWebView2WindowFeatures

Namespace
Microsoft.Web.WebView2.Core
Assembly
Microsoft.Web.WebView2.Core.dll

The window features for a WebView popup window.

public class CoreWebView2WindowFeatures
Inheritance
CoreWebView2WindowFeatures
Inherited Members

Remarks

The fields match the windowFeatures passed to window.open() as specified in Window features on MDN. There is no requirement for you to respect the values. If your app does not have corresponding UI features (for example, no toolbar) or if all instance of WebView are opened in tabs and do not have distinct size or positions, then your app does not respect the values. You may want to respect values, but perhaps only some apply to the UI of you app. Accordingly, you may respect all, some, or none of the properties as appropriate for your app. For all numeric properties, if the value that is passed to window.open() is outside the range of an uint, the resulting value is uint.MaxValue. If you are not able to parse the value an integer, it is considered 0. If the value is a floating point value, it is rounded down to an integer.

Properties

HasPosition

Indicates whether the left and top values are specified.

public bool HasPosition { get; }

Property Value

bool

HasSize

Indicates whether the height and width values are specified.

public bool HasSize { get; }

Property Value

bool

Height

Gets the height of the window. Ignored if HasSize is false.

public uint Height { get; }

Property Value

uint

Left

Gets the left position of the window. Ignored if HasPosition is false.

public uint Left { get; }

Property Value

uint

ShouldDisplayMenuBar

Indicates that the menu bar is displayed.

public bool ShouldDisplayMenuBar { get; }

Property Value

bool

ShouldDisplayScrollBars

Indicates that the scroll bars are displayed.

public bool ShouldDisplayScrollBars { get; }

Property Value

bool

ShouldDisplayStatus

Indicates that the status bar is displayed.

public bool ShouldDisplayStatus { get; }

Property Value

bool

ShouldDisplayToolbar

Indicates that the browser toolbar is displayed.

public bool ShouldDisplayToolbar { get; }

Property Value

bool

Top

Gets the top position of the window. Ignored if HasPosition is false.

public uint Top { get; }

Property Value

uint

Width

Gets the width of the window. Ignored if HasSize is false.

public uint Width { get; }

Property Value

uint