滚动查看器“锁定"到屏幕上.垂直或水平滚动时 [英] The scrollviewer "locks" when scrolling vertically or horizontally
问题描述
如果我开始垂直或水平滚动,则滚动器会锁定",这样,您只能水平或垂直滚动,直到松开为止.但是,如果我从对角滚动开始,那是没有问题的,在这种情况下,我可以按照自己的意愿操纵scrollviewer.如果我开始垂直或水平滚动,如何确保scrollViewer不会锁定".这是我的scrollViewer:
If I start the scrolling vertically or horizontically the scroller "locks", such that you can only scroll horizontically or vertically, untill you let go. If I however start of by scrolling diagonally, there is no problem, in thhese cases I can manouvre the scrollviewer how i want. How do I make sure that the scrollViewer doesn't "lock" if I start of scrolling vertically or horizontically. Here is my scrollViewer:
<StackPanel>
<TextBlock x:Name="MainPageTitle" Text="{Binding title}" Height="89"/>
<ScrollViewer Width="768" Height="380" HorizontalScrollBarVisibility="Hidden">
<Map/>
</ScrollViewer>
<TextBlock x:Name="LEgE" Text="HEJHEJEHEJEHJEHJ"/>
</StackPanel>
因此,为了澄清起见,无论我如何开始滚动,我都始终能够始终向任何方向滚动.当然有.任何帮助,将不胜感激.
So just to clarify, how do I make sure that no matter how I start of the scroll, I'm always capable of scrolling in any direction. With in the grid of course. Any help would be appreciated.
推荐答案
这是滚动浏览器在导轨"上运行的已知问题.
This is a known Issue that the scrollviewer runs on "rails".
Which is also stated in the artikel in msdn forums http://social.msdn.microsoft.com/Forums/wpapps/en-US/8fdbe189-c037-4f55-89c5-6d6814dc58f2/scrollviewer-locks-when-you-only-scroll-horizontally-or-vertically?forum=wpdevelop
但是可以看看如何处理Windows Phone的操纵事件 http://msdn.microsoft. com/zh-CN/library/windowsphone/develop/ff426933(v = vs.105).aspx
But one could look at how to handle manipulation events for windows phone http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff426933(v=vs.105).aspx
为此,您需要将ScrollViewer.ManipulationMode设置为自己控制和管理.
For this you need to set ScrollViewer.ManipulationMode to Control and manage it yourself.
但是,如第一个链接中所述,要实现平稳性非常困难.
But as stated in the first link, to acheive smoothness is very hard.
这篇关于滚动查看器“锁定"到屏幕上.垂直或水平滚动时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!