简体   繁体   English

WP7中父列表框垂直滚动时如何锁定水平滚动

[英]how to lock horizontal scrolling when parent listbox vertical scrolling in WP7

My listbox contains custom templates. 我的列表框包含自定义模板。 Every template can dragable horizontally using Toolkit GestureService. 每个模板都可以使用Toolkit GestureService水平拖动。

My goal is when scrolling listbox, items cannot dragable. 我的目标是滚动列表框时,项目无法拖动。

I need to handle parent listbox scrolling? 我需要处理父级列表框滚动吗?

How to handle this? 如何处理呢?

Use the ScrollViewer.VerticalScrollBarVisibility property to disable the scrollbar inside a ListBox control like this: 使用ScrollViewer.VerticalScrollBarVisibility属性可以禁用ListBox控件内的滚动条,如下所示:

<ListBox ScrollViewer.VerticalScrollBarVisibility="Disabled" ... >
    ...
</ListBox>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM