ICoreWebView2Controller4

Undocumented in source.
version(Windows && inline_webview2_bindings && all)
interface ICoreWebView2Controller4 : ICoreWebView2Controller3 {
static const
GUID iid;
}

Members

Functions

get_AllowExternalDrop
HRESULT get_AllowExternalDrop(BOOL* value)

Gets the AllowExternalDrop property which is used to configure the capability that dragging objects from outside the bounds of webview2 and dropping into webview2 is allowed or disallowed. The default value is TRUE.

put_AllowExternalDrop
HRESULT put_AllowExternalDrop(BOOL value)

Sets the AllowExternalDrop property which is used to configure the capability that dragging objects from outside the bounds of webview2 and dropping into webview2 is allowed or disallowed.

Inherited Members

From ICoreWebView2Controller3

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.

put_RasterizationScale
HRESULT put_RasterizationScale(double scale)

Set the rasterization scale property.

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_ShouldDetectMonitorScaleChanges
HRESULT put_ShouldDetectMonitorScaleChanges(BOOL value)

Set the ShouldDetectMonitorScaleChanges property.

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.

remove_RasterizationScaleChanged
HRESULT remove_RasterizationScaleChanged(EventRegistrationToken token)

Remove an event handler previously added with add_RasterizationScaleChanged.

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.

put_BoundsMode
HRESULT put_BoundsMode(COREWEBVIEW2_BOUNDS_MODE boundsMode)

Set the BoundsMode property.

Meta