CoreWebView2WindowFeatures Class

The window features for a WebView popup window.

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 unsigned 32bit int, the resulting value is the absolute value of the maximum for unsigned 32bit integer. 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. In runtime versions 98 or later, the values of ShouldDisplayMenuBar, ShouldDisplayStatus, ShouldDisplayToolbar, and ShouldDisplayScrollBars will not directly depend on the equivalent fields in the windowFeatures string. Instead, they will all be false if the window is expected to be a popup, and true if it is not.

Summary

Members Description
HasPosition Indicates whether the left and top values are specified.
HasSize Indicates whether the height and width values are specified.
Height Gets the height of the window.
Left Specifies the left position of the window.
ShouldDisplayMenuBar Indicates that the menu bar is displayed.
ShouldDisplayScrollBars Indicates that the scroll bars are displayed.
ShouldDisplayStatus Indicates that the status bar is displayed.
ShouldDisplayToolbar Indicates that the browser toolbar is displayed.
Top Specifies the top position of the window.
Width Specifies the width of the window.

Properties

HasPosition

readonly bool HasPosition

Indicates whether the left and top values are specified.

HasSize

readonly bool HasSize

Indicates whether the height and width values are specified.

Height

readonly uint32_t Height

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

Left

readonly uint32_t Left

Specifies the left position of the window.

Ignored if CoreWebView2WindowFeatures.HasPosition is false.

ShouldDisplayMenuBar

readonly bool ShouldDisplayMenuBar

Indicates that the menu bar is displayed.

ShouldDisplayScrollBars

readonly bool ShouldDisplayScrollBars

Indicates that the scroll bars are displayed.

ShouldDisplayStatus

readonly bool ShouldDisplayStatus

Indicates that the status bar is displayed.

ShouldDisplayToolbar

readonly bool ShouldDisplayToolbar

Indicates that the browser toolbar is displayed.

Top

readonly uint32_t Top

Specifies the top position of the window.

Ignored if CoreWebView2WindowFeatures.HasPosition is false.

Width

readonly uint32_t Width

Specifies the width of the window.

Ignored if CoreWebView2WindowFeatures.HasSize is false.

Referenced by