0

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.

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?

codechinchilla
  • 2,129
  • 13
  • 23

1 Answers1

0

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/

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;

More on it here http://msdn.microsoft.com/en-us/library/ff426933(v=vs.95).aspx

Hermit Dave
  • 3,036
  • 1
  • 13
  • 13
  • Right, GestureService is currently the best way to get pinch zoom etc, my point was that it is currently deprecated, so I am looking for a new method to getting the same functionality. ManipulationDelta/Started/Completed may be a route to do that, but I was wondering if there was a library similar to GestureService that would do the calculations and throw an event i.e. Flick, rather than having to calculate the manipulation variables manually. – codechinchilla May 09 '12 at 20:27
  • from horse's mouth http://silverlight.codeplex.com/releases/view/75888 "The GestureListener should be considered deprecated for all Windows Phone 7.1 SDK development. There is no direct replacement at this time, though the platform now supports events such as Tap right on visual elements." – Hermit Dave May 10 '12 at 08:36
  • In absense of replacement i would continue using it till it was removed from toolkit. – Hermit Dave May 10 '12 at 08:37
  • have updated original post with some stuff you might be able to use – Hermit Dave May 10 '12 at 12:21
  • thanks for the pointers, I'll see if I can use those, and I guess will have to try to roll my own from there. – codechinchilla May 11 '12 at 18:54