Windows 7 Touch

Vit*_*kin 3 wpf touch windows-7 pixelsense

我想编写一个支持触摸事件的WPF应用程序.但是,我有一个问题.我为Windows Touch安装了Windows Surface工具包,但是当我点击然后将鼠标移到它上面时,没有提出Grid的Manipulation-events(ManipulationStarting,ManipulationDelta等).

谁能告诉你如何使用Windows Surface工具包的库在WPF for Windows 7中捕获操作事件?

提前致谢.

rob*_*tos 8

如果您使用触摸设备,则操纵事件将直接起作用.如果你想使用鼠标设备模拟触摸,你可以使用Blake.NUI的MouseTouchDevice来做到这一点.

只需将该文件或库引用添加到项目并调用即可

MouseTouchDevice.RegisterEvents(this);
Run Code Online (Sandbox Code Playgroud)

在你的Window的构造函数上.如果要将鼠标模拟限制为较小的区域,还可以将另一个元素作为参数传递.