Click or drag to resize

ChromiumWebBrowser.ResizeAsync Method

Version 118.6.80
Resize the browser

Namespace:  CefSharp.OffScreen
Assembly:  CefSharp.OffScreen (in CefSharp.OffScreen.dll) Version: 118.6.80.0 (118.6.80.0)
Syntax
public Task ResizeAsync(
	int width,
	int height,
	float? deviceScaleFactor = null
)

Parameters

width
Type: System.Int32
width
height
Type: System.Int32
height
deviceScaleFactor (Optional)
Type: System.Nullable<Single>
device scale factor

Return Value

Type: Task
A task that can be awaited and will resolve when the desired size is achieved.
Remarks
The current implementation is fairly symplistic, it simply resizes the browser and resolves the task when the browser starts painting at the desired size.
See Also