Windows 7 触摸屏
我想编写一个支持触摸事件的 WPF 应用程序。 但是,我有一个问题。我安装了适用于 Windows Touch 的 Windows Surface 工具包,但是当我单击网格并将鼠标移到网格上时,不会引发任何网格的操作事件(ManipulationStarting、ManipulationDelta 等)。
谁能告诉我如何使用 Windows Surface 工具包的库捕获 WPF for Windows 7 中的操作事件?
提前致谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用触摸设备,则操作事件将直接起作用。如果你想使用鼠标设备来模拟触摸,可以使用 Blake.NUI 的 MouseTouchDevice 来就这样做。
只需将该文件或库引用添加到您的项目中并调用
窗口的构造函数即可。如果您想将鼠标模拟限制在较小的区域,您还可以传递另一个元素作为参数。
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
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.