Silverlight Windows Phone 7:手势事件? [英] Silverlight Windows Phone 7: Gesture events?

查看:84
本文介绍了Silverlight Windows Phone 7:手势事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要在Expression Blend中模拟一个wp7应用程序,并寻求设置事件处理程序以响应某些手势.某些Bing-ing显示有人建议使用单击"或其他内容,并检查两次敲击之间的时间,但似乎应该有一种更简单的方法.

I'm mocking up a wp7 app in Expression Blend and looking for set up an event handler in response to certain gestures. Some Bing-ing shows some people recommending to use "on click" or something and check the time between taps oneself, but it seems like there should be an easier way.

Silverlight控件是否有一个事件会触发手势(或特定类型的手势?)

Is there an event for Silverlight controls that fires for gestures (or specific types of gestures?)

推荐答案

Silverlight for Windows Phone 7本身不包含对手势的任何支持.但是,有许多可用的选项:

Silverlight for Windows Phone 7 doesn't natively contain any support for gestures. However, there are a number of options available:

Silverlight for Windows Phone Toolkit 包含我推荐的GestureService/GestureListener先看.

The Silverlight for Windows Phone Toolkit contains a GestureService/GestureListener which I'd recommend looking at first.

洛朗·布格尼翁(Laurent Bugnion)创建了 MultiTouch行为,可能会引起您的兴趣,具体取决于您的特定要求.

Laurent Bugnion has created some MultiTouch behaviours which may be of interest, dependeing on your specific requirements.

最后一个选择是使用某些 XNA Framework支持的手势. 迈克·奥蒙德(Mike Ormond)为使用它们撰写了很好的介绍.

A final option would be to use some of the gestures supported by the XNA Framework. Mike Ormond has written a good introduction to using them.

此外,您还必须通过使用 ManipulationDelta 处理操作事件的指南您还可以将其用作自己检测手势的指针.

Beyond that you'll have to detect/determine gestures yourself through use of the ManipulationStarted, ManipulationDelta and ManipulationCompleted events. MSDN also has a guide to handling manipulation events which you could also use as a pointer to detecting gestures yourself.

这篇关于Silverlight Windows Phone 7:手势事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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