Rank: Member Groups: Member
Joined: 10/19/2020 Posts: 12
|
Hello, We noticed that width and height parameters in WebView.Resize method do not correspond to the internal width and height of the browser window. The internal browser window size is always less than the size passed to the WebView.Resize method call.
Is this difference always the same? If no, is there a way to resize the internal browser window to the exact size, as it often necessary to get a captured image of a good quality?
Thanks, S. Makagonov.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
Hi, The difference is usually the scrollbars. You can try to override the scrollbar with JavaScript code:
Code: C#
webView.EvalScript("document.body.style.overflow = 'hidden';");
After that the content size should be the same as the WebView size. Thanks!
|
Rank: Member Groups: Member
Joined: 10/19/2020 Posts: 12
|
It worked, thank you!
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,217
|
You are welcome. Please feel free to let us know if you need anything else.
|