Disable scrolling in browser control for WP7?

懵懂的女人 提交于 2019-12-03 16:32:53

There is a blog post here explaining how to suppress the zoom and scroll functionality of the WebBrowser control. Quote from that post:

The visual tree is quite simple, composed of a few grids and borders. The significant parts are the TileHost, which is the native IE9 component, and the PanZoomContainer. The TileHost does not handle the mouse manipulation events, these are instead handled by the PanZoomContainer, where they are then translated into gestures (i.e. pinch-zoom) with the result fed back to the TileHost.

What this means is that we can intercept the manipulation events as they bubble up to the PanZoomContainer, cancelling them before they are turned into gestures.

Given the webbrowser:

To disable interaction set IsHitTextVisible= false

<phone:WebBrowser Height="600" IsHitTestVisible="False" />

To disable scrolling only, set ScrollViewer.VerticalScrollBarVisibility= disabled

<phone:WebBrowser Height="600" ScrollViewer.VerticalScrollBarVisibility="Disabled" />
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!