本文介绍了如何从GestureListener.Gesture触发EventToCommand的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人使用Toolkit.GestureListener触发EventToCommand吗?

Has anyone used a Toolkit.GestureListener to fire an EventToCommand?

推荐答案

我认为您无法通过EventToCommand行为来做到这一点,但我创建了一个行为,该行为可以通过将GestureListener绑定到命令来轻松添加.

I don't think you can do it with the EventToCommand behaviour but I have created a behaviour that allows easy addition of the GestureListener by binding them to a command.

<Button  Content="Start"  
 Behaviour:GestureListenerBehaviours.TapCommand="{Binding   StartCommand}" />

我只映射了抽头和双击,但是如果需要的话,应该很容易映射其余部分.看看此链接以获取源代码

I have only mapped the tap and the double tap but it should be easy to map the rest if required. Have a look at this link to get the source code

http://lazycowprojects.tumblr.com/post/10397441921/gesturelistenerbehaviourswp7

这篇关于如何从GestureListener.Gesture触发EventToCommand的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-27 14:12