Surface Toolkit for Windows Touch Beta 中没有 ManipulationCompleted 事件

发布于 2024-10-07 09:06:37 字数 558 浏览 0 评论 0原文

我正在使用 Surface Toolkit for Windows Touch Beta。我在 ScatterView 上的 ScatterViewItem 内有一个 UserControl。我想在 UserControl 上接收 ManipulationCompleted 事件,但即使也设置了 IsManipulationEnabled="True" ,它似乎也不会被引发。同样的事情在非 Surface WPF4 应用程序中完美运行。

看来各种 Touch WPF 事件与 Surface 配合得很好,但重新创建点击事件和 NSWE 事件似乎需要做很多工作,我可以从 ManipulationCompleted 事件轻松解释这些事件。

我正在寻找在我的 UserControl 上接收 ManipulationCompleted 事件或通过处理现有触摸事件来模拟它的方法。

有什么指点吗?

I am using Surface Toolkit for Windows Touch Beta. I have a UserControl within a ScatterViewItem on a ScatterView. I want to receive ManipulationCompleted event on a UserControl but it doesn't seem to ever be raised even though IsManipulationEnabled="True" is also set. The same thing works perfectly in a non-Surface WPF4 app.

It appears various Touch WPF events play well with Surface but it seems like a lot of work to recreate a tap event and NSWE events that I can easily interpret from ManipulationCompleted event.

I am looking on ways to either receive ManipulationCompleted event on my UserControl or to simulate it by handling existing touch events.

Any pointers?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

Spring初心 2024-10-14 09:06:37

当您的用户控件被触摸时,scatterviewitem 是否会移动?一次只能有一个元素可以跟踪给定触摸的操作。如果 scatterviewitem 正在获取操作事件,则意味着您的用户控件不会。

如果您只想让用户控件处理输入,则让它监听 TouchDown 并调用 usercontrol.Capture(touch)。如果你想让 SVI 做它的事情,但也自己处理完成的事件,那么你必须手动注册你的事件处理程序:usercontrol.AddHandler(ManipulationCompletedEvent, yourHandler, true)。最后一个参数表示您想要处理该事件,即使 SVI 已经处理了该事件。

does the scatterviewitem move when your usercontrol is touched? only one element at a time can be tracking manipulations for a given touch. if the scatterviewitem is getting the manipulation events, that means your user control will not.

if you only want your usercontrol to handle the input, then have it listen to TouchDown and call usercontrol.Capture(touch). if you want to have the SVI do it's thing but also handled the completed event on your own, then you will have to register your event handler manually: usercontrol.AddHandler( ManipulationCompletedEvent, yourHandler, true). the last parameter says you want to handle the event even if SVI already has.

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