Windows 7 触摸屏

发布于 2024-10-07 12:32:51 字数 243 浏览 0 评论 0原文

我想编写一个支持触摸事件的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟沫凡尘 2024-10-14 12:32:51

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

只需将该文件或库引用添加到您的项目中并调用

MouseTouchDevice.RegisterEvents(this);

窗口的构造函数即可。如果您想将鼠标模拟限制在较小的区域,您还可以传递另一个元素作为参数。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文