WinRT的XAML中的ListView - 触摸不滚动以及 [英] WinRT Xaml ListView - Touch doesn't scroll well

查看:143
本文介绍了WinRT的XAML中的ListView - 触摸不滚动以及的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个水平列表观点,即滚动屏幕外的权利,像这样的:

I have a horizontal list view that scrolls offscreen to the right, such as this:

问题是,采用触摸当你不能刷卡滚动默认的ListView,它似乎只是抢ListView项和水平拉一点点。我可以得到它的滚动的唯一方法是点击5-10像素中的每个ListViewItem的,这是可怕的。

The problem is, when using touch you can't swipe to scroll the ListView by default, it seems to just grab the ListView item and pull it horizontally a little bit. The only way I can get it to scroll is to click the 5-10 pixels in between each ListViewItem, which is horrible.

有没有修改这个行为设置?

Is there a setting to modify this behavior?

我的XAML是基本上是这样的:

My Xaml is basically this:

            <ListView 
                x:Name="listView" Grid.Column="1" IsItemClickEnabled="True"
                ItemsSource="{Binding Assignments}" SelectionMode="None" ItemClick="OnItemClick">
                <ListView.ItemsPanel>
                    <ItemsPanelTemplate>
                        <StackPanel Orientation="Horizontal" />
                    </ItemsPanelTemplate>
                </ListView.ItemsPanel>
                <ListView.ItemTemplate>
                    <DataTemplate>
                       <!--cool template to make UI in screenshot-->
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>



我应该问杰里?

Should I ask Jerry?

< IMG SRC =http://i.stack.imgur.com/OgzAI.pngALT =杰里!!!!>

推荐答案

嗯,这是由于有一个父的ScrollViewer 的ListView ,我有一个大的外全景与在它4或5的控制,包括的ListView

Hmm, it was due to having a parent ScrollViewer outside of the ListView, I have a large "panorama" with 4 or 5 controls within it, including the ListView.

我能够通过设置来解决它这对的ListView

I able to fix it by setting this on the ListView:

ScrollViewer.Horizo​​ntalScrollMode =已禁用ScrollViewer.VerticalScrollMode = 禁用

这篇关于WinRT的XAML中的ListView - 触摸不滚动以及的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆