Welcome Guest Search | Active Topics | Sign In | Register

WebView.Resize width and height meaning Options
svma
Posted: Tuesday, December 5, 2023 5:54:21 AM
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.
eo_support
Posted: Tuesday, December 5, 2023 9:45:20 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,089
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!
svma
Posted: Tuesday, December 5, 2023 10:16:12 AM
Rank: Member
Groups: Member

Joined: 10/19/2020
Posts: 12
It worked, thank you!
eo_support
Posted: Tuesday, December 5, 2023 11:03:18 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,089
You are welcome. Please feel free to let us know if you need anything else.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.