开发者

Windows 7 Touch

开发者 https://www.devze.com 2023-01-30 02:52 出处:网络
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

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 i开发者_C百科n WPF for Windows 7 using Windows Surface toolkit's library?

Thanks in advance.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消