wpfwindows-10tabletstylustouchscreen

How to enable scrolling with stylus in a WPF touchscreen application?


I have controls like scrollviewer, datagrid, combobox etc.. and I can scroll with my finger, mouse wheel, but not with the attached pen. Is there any behavior, or property where I can enable this functionality?


Solution

  • I had to catch the stylus up/down/move events and convert them to touch events as you can see here the same with mouse events: https://archive.codeplex.com/?p=blakenui

    Plus I also wanted to press buttons, select texboxes.. so I calculated the distance in pixels between the starting and the end point. This way I can decide whether it is a simple touch or a scolling move and can set the Handled property accordingly.