We've got a Microsoft.Phone.Controls.WebBrowser
embedded control inside a StackPanel
, inside a PivotItem
on Windows Phone 8. In a simplified form, it's basically:
<Grid>
<controls:Pivot Width="425" Margin="50,0,0,0">
<controls:PivotItem Margin="0,0,0,0" Width="400">
<StackPanel>
<!-- Other stuff -->
<phone:WebBrowser Margin="0,0,0,0" Padding="0,0,0,0" Width="400" Height="600" />
</StackPanel>
</controls:PivotItem>
</controls:Pivot>
</Grid>
The problem is, unlike other controls, the WebBrowser
seems to intercept all scroll events, even if no internal scrolling is required. This basically means that, once the WebBrowser
control is on the screen, the only way to scroll to the next PivotItem
is to tap on the headers at the top, which is a drag.
Some tricks I've tried include
ScrollViewer
's HorizontalScrollBarVisibility
to Disabled
ManipulationDelta
and/or ManipulationCompleted
events and propagating them up myself — they don't fire as you would expect them toWebBrowser
and parent's width to make it realize that no scrolling is necessary.It seems like something out of the ordinary is going on here. Any suggestions on how to change this behaviour?
Tryout this link. I think Mr.Colin Eberhardt's solution will help you to solve your issue, http://www.scottlogic.co.uk/blog/colin/2011/11/suppressing-zoom-and-scroll-interactions-in-the-windows-phone-7-browser-control/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With