none
ListView竖向滑动时禁用左右滑动 RRS feed

  • 问题

  • 上图有个ListView展示集合数据,是竖向滑动的,外面的红线处是横向滑动的。

    如何禁用ListView的横向滑动呢?如果不禁用的话外面横向滑动的时候有时候会点着ListView项左右滑动,这时候就没法滑动了,因为ListView也可以左右滑动,如图:

    怎么禁止其中的ListView项左右滑动呢?

    2014年5月5日 4:39

答案

全部回复

  • 你好,这个问题其实挺常见的,参考一下这个Blog: http://blogs.msdn.com/b/wsdevsol/archive/2013/02/16/where-did-all-my-gestures-go.aspx 根本原因在于大的GridView中包含了一个ScrollViewer,而ScrollViewer正是把你手势动作吃掉的那个。

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    2014年5月6日 7:23
    版主
  • 其实如果你可以提供一个Demo来让我做一下测试的话效果会更好,现在完全不知道你代码的布局是如何的,无法给出一个完善的结论 :)

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    2014年5月23日 8:53
    版主