Click or drag to resize

IBrowserSize Property

Gets or sets the browser size.

Namespace:  DotNetBrowser.Browser
Assembly:  DotNetBrowser (in DotNetBrowser.dll) Version: 2.17.0
Syntax
C#
Size Size { get; set; }

Property Value

Type: Size
The browser size. By default, browser's size is empty.
Exceptions
ExceptionCondition
ObjectDisposedExceptionThe IBrowser has already been disposed.
ConnectionClosedExceptionThe connection to the Chromium engine is closed.
Remarks

Setting this property updates the size of this Browser instance with the given width and height. Many web pages rely on the Browser's size and require that it's not empty. DOM document of a web page might not be loaded and displayed at all, because there's no sense in loading and rendering DOM document when it's empty.

As a result, you should set the browser size programmatically when you don't need to display content of the loaded web page, but the web page must "think" it has been loaded in a browser instance with a non-empty size.

See Also