jonathanpeppers
jonathanpeppers

Reputation: 26495

WinRT Xaml ListView - Touch doesn't scroll well

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

enter image description here

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?

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?

JERRY!!!!

Upvotes: 4

Views: 4680

Answers (1)

jonathanpeppers
jonathanpeppers

Reputation: 26495

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.

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

ScrollViewer.HorizontalScrollMode="Disabled" ScrollViewer.VerticalScrollMode="Disabled"

Upvotes: 4

Related Questions