WP7工具包GestureService是否有高级替代品? [英] Is there a high level replacement for the WP7 Toolkit GestureService?
问题描述
我目前在一些应用程序中使用WP7 Takeit的GestureService
,以便在Silverlight UI元素上执行Flick和Pinch/Zoom手势.但是,鉴于该服务已被弃用,我试图找到一个可以以类似方式执行所有低层计算的替换库.
I currently use the WP7 tookit's GestureService
in a few of my applications in order to perform Flick and Pinch/Zoom gestures on Silverlight UI elements. However, seeing that the service has been deprecated, I am trying to find a replacement library that can do the perform all the low level calculations in a similar fashion.
我一直在读,迷上ManipulationDelta
是必经之路,但我宁愿不去探究,如果我不必-有人知道吗?
I've been reading that hooking into ManipulationDelta
is the way to go, but I'd rather not delve into that if I don't have to - is there an alternative that anyone is aware of?
推荐答案
您可以使用ManipulationStarted,ManipulationDelta和ManipulationCompleted-这是高级的.您还可以使用Touch.FrameReported-提供有关用户触摸的低级界面
you can use ManipulationStarted, ManipulationDelta and ManipulationCompleted - which are high level. you can also use Touch.FrameReported - which provides a low-level interface on user touch
http://invokeit.wordpress .com/2012/04/27/high-performance-touch-interface-wpdev-wp7dev/
我使用GestureService而不是自己滚动来进行缩放,轻拂和拖动
I use GestureService instead of rolling my own for pinch zoom, flick and drag
找到了更多可用于替换手势服务的内容.
Found some more stuff that can be used to replace gesture service.
// Scale the rectangle.
this.scale.ScaleX *= e.DeltaManipulation.Scale.X;
this.scale.ScaleY *= e.DeltaManipulation.Scale.Y;
// Move the rectangle.
this.translation.X += e.DeltaManipulation.Translation.X;
this.translation.Y += e.DeltaManipulation.Translation.Y;
此处有更多信息 http://msdn .microsoft.com/en-us/library/ff426933(v = vs.95).aspx
这篇关于WP7工具包GestureService是否有高级替代品?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!