I’m using the WPF WebBrowser component to display some very simple HTML content. However, since I don’t know the content size in advance, I’m currently getting scrollbars on the control when I load certain datasets.
Basically, how can I force (or otherwise effect the equivalent of forcing) the WebBrowser to expand in size so that all content is displayed without the need for scrollbars?
I guess you can get width and height of the webbrowser component content through its Document property which should be of mshtml.HTMLDocument type. I believe you should be able to use body or documentElement properties to get needed sizes; smth like this:
hope this helps, regards