[UWP]如何在windows phone10应用程序中识别用户手指移动 [英] [UWP]How to recognize user finger movement in windows phone10 application

查看:194
本文介绍了[UWP]如何在windows phone10应用程序中识别用户手指移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在XAML页面中有一个Grid。要求是:当用户创建"N"时,用手指触摸,他将被导航到另一页。我目前正在使用

I have a Grid in a XAML page. Requirement is: When the user creates a "N" with his finger touch , he will be navigated to another page. I am currently using

ContentPanel.ManipulationMode =
ManipulationModes 。全部;

ContentPanel.ManipulationMode = ManipulationModes.All;

ContentPanel.ManipulationStarted + = ContentPanel_ManipulationStarted;

ContentPanel.ManipulationStarted += ContentPanel_ManipulationStarted;

ContentPanel.ManipulationDelta + = ContentPanel_ManipulationDelta;

ContentPanel.ManipulationDelta += ContentPanel_ManipulationDelta;

ContentPanel.ManipulationCompleted + = ContentPanel_ManipulationCompleted;

ContentPanel.ManipulationCompleted += ContentPanel_ManipulationCompleted;

我无法输入将检查用户是否创建了"N"的逻辑。用手指的信。谁能帮忙。

I am not able to put the logic which will check if the user has created a "N" letter with finger. Can anyone help.

请注意:我尝试使用Inkcanvas。它不符合我的要求,因为它会停止滚动网格,最重要的是它不会有Windows Phone 10的识别器。

Please Note: I have tried with Inkcanvas .It wont fit my requirement as it will stop the scrolling of the grid and most important it will not have recognizer for windows phone 10 .

推荐答案

我直接观察Pointer事件而不是操作事件。您需要创建自己的启发式来检测"N"。 PointerPressed和PointerReleased之间的PointerMoved事件中的逻辑。

I'd watch the Pointer events directly rather than the manipulation events. You'll need to create your own heuristic to detect the "N" logic in PointerMoved events between a PointerPressed and PointerReleased.

没有内置(Inking之外)来帮助识别。手写识别是非常困难的,但是如果你只是想要一些模糊的N喜欢它可能不是很难看到指针基本上直线向上移动,然后在对角线下降
,然后直接向上。

There's nothing built in (outside of Inking) to help with this recognition. Handwriting recognition is very difficult, but if you just want somethin vaguely N like it probably isn't to hard to see that the pointer moves essentially straight up, then down at a diagonal, and then straight up.

要检查的文档:


这篇关于[UWP]如何在windows phone10应用程序中识别用户手指移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆