Hello Team Support, First of all thanks for your valuable time. I have a problem with the WPF WebBrowser control. I need to deactivate the zoom and scroll page (on touch pad or tactile screen) when i manipulate the page. Thanks for your help and valuable time. Frederic
You have to do both of these things inside of the document that is hosted in the browser via styling and script.
For scrollbars using CSS styling:
html, body { overflow: hidden }
will prevent any window scrollbars in the browser document.
For zooming you can intercept the resize
event on the window.
https://stackoverflow.com/a/6168235/11197
All of this has to happen inside of the document you're displaying so either you have a template that includes this functionality, or if you don't control the HTML to display you have to inject the script and dynamically set the CSS.
+++ Rick ---
Hello Rick, Thank you so much for your reply. Have a nice day. Best regards, Frederic
if you build the HTML page, you can try to add this in the <head>
section:
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
Unfortunately no, not in a desktop browser.
You can try it on this page which has those attributes, but you can still scroll zoom in a desktop browser. Viewport sizing is respected only on mobile browsers.
I think you can look at the resize event and then check the zoom level and reset the zoom level back to 100% or whatever you want to allow.
+++ Rick ---