For C#
WPF
, there is a event handler MouseWheel
for scrolling using mouse wheel. Is there any similar event handler for scrolling using touch/panning?
1 Answers
If you are using a ScrollViewer
and you have touch hardware (which causes manipulation events to occur), then you can use the PanningMode
property.
If you don't have touch hardware, and you want the mouse to be used for panning, then you can add some additional behaviour to a ScrollViewer
to support that.
If you want a normal mouse to be able to generate cause "manipulation" events to occur (i.e. simulate a touch device)....then you can use the MultiTouch SDK to provide a new device that will map mouse events to touch ones - something you don't normally get.
https://blogs.msdn.microsoft.com/ansont/2010/01/30/custom-touch-devices/
WPF: Is there a possibility to "route" ordinary mouse events to touch events in Windows 7
If you have want to handle manipulation events (via real touch hardware, or the simulated one via MultiTouch SDK), and have PanningMode
work at the same time on the ScrollViewer
...use this.

- 1
- 1

- 12,375
- 4
- 39
- 47