Reputation: 7424
Is it possible to disable the scrolling in a web browser control in Windows Phone 7.1? I have seen quite a few questions ask around it (Windows Phone 7.0, Silverlight) but an answer has yet to come up. Any ideas?
Upvotes: 5
Views: 4290
Reputation: 69372
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.
Upvotes: 7
Reputation: 4268
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" />
Upvotes: 2