3
votes

I want to write a WPF-application with support of touch events. But, I have a problem. I installed Windows Surface toolkit for Windows Touch, but none of the Manipulation-events (ManipulationStarting, ManipulationDelta and other) for the Grid are not raised when I’m clicking and then moving the mouse over it.

Could anyone tell how to catch manipulation events in WPF for Windows 7 using Windows Surface toolkit's library?

Thanks in advance.

1

1 Answers

9
votes

If you use a touch device the Manipulation events will work directly. If you want to use a mouse device to simulate touch, you can use Blake.NUI's MouseTouchDevice to do just that.

Simply add that file or library reference to your project and call

MouseTouchDevice.RegisterEvents(this);

on the constructor of your Window. You can also pass another element as parameter if you want to limit the mouse simulation to a smaller region.