Single Touch Read As Scrolling Action

I have a WPF application that is designed to be used on a touch screen.

I use a list view with a set of images, and the selected image is displayed in full-size image control

When on the touch screen I can select images just by tapping the image in the list item, however I have a little problem.

When the user touches the screen, often the user's fingers move slightly while still in contact with the screen, which leads to viewing a list that interprets the touch as a scroll request.

This means that the desired selection actually occurs only when the user is careful or has no movement when in contact with the screen.

I assume that this is a problem with a threshold in which it defines the scroll action, but I cannot find a solution to this problem.

Can anyone help?

+7
c # wpf visual-studio-2015 touch
source share
1 answer

You can manually toggle PanningMode for the ListView list of the internal Scrollviewer . Here's how to get a scrollviewer:

// Get the border of the listview (first child of a listview) Decorator border = VisualTreeHelper.GetChild(myListView, 0) as Decorator; // Get scrollviewer ScrollViewer scrollViewer = border.Child as ScrollViewer; 

You can now access the scrollviewer PanningMode property.

You would only set the VerticalFirst pan mode as soon as the finger moves a certain threshold of your taste using the ManipulationDelta event, and you set it to None again when the finger is released ( ManipulationCompleted event is raised).

+2
source share

All Articles