locked
WinRT ScrollViewer prevent from scroll with mouse wheel but enable swipe

    Question

  • I have WinRT XAML metro application with following xaml markup:

    <ScrollViewer>
      <ItemsControl ItemsSource="{Binding Items}">
        <ItemsControl.ItemsPanel>
         <ItemsPanelTemplate>
          <StackPanel Orientation="Horizontal"/>
         </ItemsPanelTemplate>
        </ItemsControl.ItemsPanel>
      </ItemsControl>
    </ScrollViewer>

    How can I prevent ScrollViewer from scrolling with mouse wheel (on PC), but enable swiping with finger (on tablets) ?


    Wednesday, February 19, 2014 9:25 AM

All replies

  • Why do you want to do this? What scenario are you trying to achieve?

    It sounds like the ScrollViewer is the wrong approach if you don't want mouse users to be able to scroll.

    --Rob

    Wednesday, February 19, 2014 3:51 PM
    Owner