Adr*_*scu 12 .net xaml windows-phone-8
我们在Windows Phone 8 内部有一个Microsoft.Phone.Controls.WebBrowser嵌入式控件.在简化形式中,它基本上是:StackPanelPivotItem
<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>
Run Code Online (Sandbox Code Playgroud)
问题是,与其他控件不同WebBrowser,即使不需要内部滚动,似乎也会拦截所有滚动事件.这基本上意味着,一旦WebBrowser控件在屏幕上,滚动到下一个的唯一方法PivotItem是点击顶部的标题,这是一个拖动.
我试过的一些技巧包括
ScrollViewer的HorizontalScrollBarVisibility对DisabledManipulationDelta和/或ManipulationCompleted事件并将它们自己传播 - 它们不像你期望的那样发射WebBrowser父母的宽度进行每种可能的排列,以使其意识到不需要滚动.这似乎是一件与众不同的事情.有关如何更改此行为的任何建议?
试试这个链接。我认为 Colin Eberhardt 先生的解决方案将帮助您解决您的问题, http://www.scottlogic.co.uk/blog/colin/2011/11/suppressing-zoom-and-scroll-interactions-in-the-windows -电话-7-浏览器控制/
| 归档时间: |
|
| 查看次数: |
1010 次 |
| 最近记录: |