Table of Contents

Property Size

Namespace
DotNetBrowser.Browser
Assembly
DotNetBrowser.dll

Size

Gets or sets the browser size.

Size Size { get; set; }

Property Value

Size

The browser size. By default, browser's size is empty.

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.

Exceptions

ObjectDisposedException

The IBrowser has already been disposed.

ConnectionClosedException

The connection to the Chromium engine is closed.