0

Is it possible with 4.5.2 to achieve a list (either from ItemsControl or using ListView/ListBox) with smooth, pixel-based scrolling, virtualised and with touch scroll to allow finger/flick scrolling on a touch screen?

I can achieve the smooth scrolling with virtualisation, but if I were to lose any of these, the preference would be virtualisation, so to have smooth touch scrolling for a non-virtualised list would be great.

Code so far:

IsSynchronizedWithCurrentItem="True"
ScrollViewer.PanningMode="VerticalOnly" VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.ScrollUnit="Pixel">

<ListBox.ItemTemplate>
    <DataTemplate>
        <!-- the item in the list -->
    </DataTemplate>
</ListBox.ItemTemplate>

James Harcourt
  • 4,916
  • 4
  • 16
  • 35
  • Look into the Surface 2.0 run-time. There's built in WPF controls that have flick/touch scrolling capabilities. – d.moncada Sep 27 '16 at 15:03

1 Answers1

0

In addition to setting ScrollViewer.PanningMode=".." which will enable touch input, try setting ScrollViewer.CanContentScroll="False" on your ScrollViewer or at the internal ScrollViewer of your ListBox/ListView.

This should do the trick, but unfortunately this will also stop the virtualisation from working. See the Remarks at the MS Documentation for CanContentScrollProperty.

For more Information check out the answers on

this qustion

or this one.

Community
  • 1
  • 1
Tobias Hoefer
  • 945
  • 8
  • 24