开发者

Silverlight Windows Phone 7: Gesture events?

开发者 https://www.devze.com 2023-01-20 04:37 出处:网络
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

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开发者_JS百科 easier way.

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


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

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

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

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.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消