Derek Lakin

Disabling Touch on a WebBrowser control

If you’re presenting content to the user with a WebBrowser control, but it’s not meant to be interacted with, then you will probably want to disable touch input to prevent the user from scrolling or zooming. Although setting IsEnabled or IsHitTestVisible to False can give you want you want, it’s also likely to mess with the appearance (a grey overlay). So, to work round this, use CSS in the source HTML like so:

html {
  overflow: hidden; /* Disable scrolling */
  -ms-content-zooming: none; /* Disable zooming */
}
featured touch webbrowser wpdev