IBrowserSize Property |
Namespace: DotNetBrowser.Browser
Size Size { get; set; }
Exception | Condition |
---|---|
ObjectDisposedException | The IBrowser has already been disposed. |
ConnectionClosedException | The connection to the Chromium engine is closed. |
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.