本文介绍了Scrollviewer“锁定”当您只水平或垂直滚动​​时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hej



我在stackoverflow上也问了这个问题,没有人有答案。

http://stackoverflow.com/questions/19592285/the-scrollviewer-locks-when-scrolling-垂直或水平

$
如果我开始垂直或水平滚动滚动条"锁定",这样你只能在水平或垂直方向滚动,直到你松开。
如果我开始通过对角滚动,没有问题,在这些情况下,我可以按照我想要的方式操作滚动查看器。如何确保scrollViewer不"锁定"?如果我开始垂直或水平滚动。这是我的
scrollViewer:

Hej

I have asked this question also on stackoverflow, with no one having an answer.
http://stackoverflow.com/questions/19592285/the-scrollviewer-locks-when-scrolling-vertically-or-horizontally

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 these 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>




所以只是为了澄清,我如何确保无论我如何开始滚动,我总是能够向任何方向滚动。当然在网格中。任何帮助
将不胜感激。

推荐答案

Windows手机ScrollViewer控件没有直接控制它是否在rails上运行的属性(与Windows应用商店应用ScrollViewer控件的
对比
IsHorizo​​ntalRailEnabled
和IsVerticalRailEnabled)。

The Windows Phone ScrollViewer control doesn't have a property to directly control if it runs on rails or not (contrast with the Windows Store app ScrollViewer control'sIsHorizontalRailEnabled and IsVerticalRailEnabled).

我还没有试过这个,但如果你想覆盖操作方式的工作,你可以尝试设置
ScrollViewer ManipulationMode 自行控制和管理。

I haven't tried this, but if you want to override the way manipulations work you can try setting theScrollViewer.ManipulationMode to Control and manage it yourself.

- Rob


这篇关于Scrollviewer“锁定”当您只水平或垂直滚动​​时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 23:05