Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Silverlight Windows Phone 7: Gesture events?

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.

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

like image 661
Nick Heiner Avatar asked Jan 21 '23 06:01

Nick Heiner


1 Answers

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.

like image 142
Matt Lacey Avatar answered Jan 28 '23 12:01

Matt Lacey