ICoreWebView2Controller3

Undocumented in source.

Members

Functions

add_RasterizationScaleChanged
HRESULT add_RasterizationScaleChanged(ICoreWebView2RasterizationScaleChangedEventHandler eventHandler, EventRegistrationToken* token)

Add an event handler for the RasterizationScaleChanged event. The event is raised when the WebView detects that the monitor DPI scale has changed, ShouldDetectMonitorScaleChanges is true, and the WebView has changed the RasterizationScale property.

get_BoundsMode
HRESULT get_BoundsMode(COREWEBVIEW2_BOUNDS_MODE* boundsMode)

BoundsMode affects how setting the Bounds and RasterizationScale properties work. Bounds mode can either be in COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS mode or COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE mode.

get_RasterizationScale
HRESULT get_RasterizationScale(double* scale)

The rasterization scale for the WebView. The rasterization scale is the combination of the monitor DPI scale and text scaling set by the user. This value should be updated when the DPI scale of the app's top level window changes (i.e. monitor DPI scale changes or window changes monitor) or when the text scale factor of the system changes.

get_ShouldDetectMonitorScaleChanges
HRESULT get_ShouldDetectMonitorScaleChanges(BOOL* value)

ShouldDetectMonitorScaleChanges property determines whether the WebView attempts to track monitor DPI scale changes. When true, the WebView will track monitor DPI scale changes, update the RasterizationScale property, and raises RasterizationScaleChanged event. When false, the WebView will not track monitor DPI scale changes, and the app must update the RasterizationScale property itself. RasterizationScaleChanged event will never raise when ShouldDetectMonitorScaleChanges is false. Apps that want to set their own rasterization scale should set this property to false to avoid the WebView2 updating the RasterizationScale property to match the monitor DPI scale.

put_BoundsMode
HRESULT put_BoundsMode(COREWEBVIEW2_BOUNDS_MODE boundsMode)

Set the BoundsMode property.

put_RasterizationScale
HRESULT put_RasterizationScale(double scale)

Set the rasterization scale property.

put_ShouldDetectMonitorScaleChanges
HRESULT put_ShouldDetectMonitorScaleChanges(BOOL value)

Set the ShouldDetectMonitorScaleChanges property.

remove_RasterizationScaleChanged
HRESULT remove_RasterizationScaleChanged(EventRegistrationToken token)

Remove an event handler previously added with add_RasterizationScaleChanged.

Inherited Members

From ICoreWebView2Controller2

get_DefaultBackgroundColor
HRESULT get_DefaultBackgroundColor(COREWEBVIEW2_COLOR* backgroundColor)

The DefaultBackgroundColor property is the color WebView renders underneath all web content. This means WebView renders this color when there is no web content loaded such as before the initial navigation or between navigations. This also means web pages with undefined css background properties or background properties containing transparent pixels will render their contents over this color. Web pages with defined and opaque background properties that span the page will obscure the DefaultBackgroundColor and display normally. The default value for this property is white to resemble the native browser experience.

put_DefaultBackgroundColor
HRESULT put_DefaultBackgroundColor(COREWEBVIEW2_COLOR backgroundColor)

Sets the DefaultBackgroundColor property.

Meta