Reputation: 1910
I have a kiosk computer with a touch screen and Windows Embedded POSready 7.
I then have a WPF application with only a WebBrowser inside, that launch a website. (The WebBrowser uses Internet Explorer engine)
In this website, I would like to prevent zooming on the page with a pinch to zoom.
I tried things like :
html {
-ms-content-zooming: none;
-ms-touch-action: pan-x pan-y;
}
But it doesn't works.
What is the page event for a "pinch" ? Maybe I can replace this behavior...
Is there a way to do it ? Even if it's a workaround method... I absolutely need to prevent zooming on the page...
Upvotes: 1
Views: 5554
Reputation: 4249
You were right with your code :
html {
-ms-content-zooming: none;
-ms-touch-action: pan-x pan-y;
}
the problem is that these properties are only implemented in the Windows 8 version (or later) of IE. (see requirements here : https://msdn.microsoft.com/en-us/library/ie/hh771891(v=vs.85).aspx)
For Win7 IE10+ you'll have to change the browser or OS settings as Jean-François Beauchamp said above.
For Win8+ IE10+, Microsoft has a listing of all events and CSS properties to manage the zoom or other functions. See it here : https://msdn.microsoft.com/en-us/library/ie/hh772726(v=vs.85).aspx
Upvotes: 1
Reputation: 5605
What I have observed is that the pinch gesture is tied to the browser Zoom level. So I don't know if this can be controlled from within an HTML document. You can change this behavior in the registry though, and this might be a solution for you, since you are operating a kiosk:
http://www.sevenforums.com/tutorials/86756-internet-explorer-zoom-enable-disable.html
Another solution could be to disable the pinch-zoom behavior in your OS. In other words, disable Control Panel - Mouse- Device Settings - Settings - PINCH ZOOM.
Upvotes: 3