locked
Manipulation and Gesture Events registering anywhere in app

    Question

  • Hello,

    I'm developing an app where I want the user to be able to use 'Swipe' gestures (quick drags to the left, right, up or down) with either 1 touch or 2 touches. I've been reading through forum posts and documentation and it seems I'm only able to use Manipulation Events and the GestureRecognizer on elements like rectangles and images. Is there a way for the 'MainPage' class or the main 'App' class to recognize the manipulation events.

    If not, is there a different way to handle what I would like to do? Is there a way to do this with Pointer events? I know I can use PointerPressed and PointerReleased events and just calculate the difference and direction to figure out a swipe but that only works for 1 touch. Is there a way to modify this to two touch?

    I appreciate any help I can get, thanks!

    Thursday, May 31, 2012 2:38 PM

Answers

  • Hi DLAlex,

    You can register your events on your main page. The samples deal with rectangles and images because it is more common (and slightly more complex) to manipulate an element within the page.

    The Pointer* events will tell you which PointerID they refer to, so you can track multiple touches by tracking the different IDs that are pressed but not released.

    --Rob

    Thursday, May 31, 2012 2:44 PM
    Owner

All replies

  • Hi DLAlex,

    You can register your events on your main page. The samples deal with rectangles and images because it is more common (and slightly more complex) to manipulate an element within the page.

    The Pointer* events will tell you which PointerID they refer to, so you can track multiple touches by tracking the different IDs that are pressed but not released.

    --Rob

    Thursday, May 31, 2012 2:44 PM
    Owner
  • Thanks Rob. I'm going to check out the PointerID method. I'll let you know how it goes, or if I need any more help!

    Thursday, May 31, 2012 3:02 PM