locked
Is GestureRecognizer still needed in a XAML app

    Question

  • In a Direct3D app, one needs to create an instance of GestureRecognizer that serves as a link between low-level CoreWindow pointer events (PointerPressed, PointerWheelChanged etc.) and high-level GestureRecognizer events (Tapped, RightTapped, OnManipulationStarted etc.). I thought one possible reason for introducing GestureRecognizer class is that there is no high-level events defined in CoreWindow.

    Now in a XAML app however, nearly all high-level events (Tapped, RightTapped, OnManipulationStarted etc.) are defined in UIElement. This makes GestureRecognizer unnecessary at first thought. The GestureRecognizer can be used as an event filter, e.g. the PointerMove event won't generate OnManipulationDelta event if the Gesture settings are modified in certain way.

    Anyway, I'd like to know your thoughts about this topic.

    Friday, October 05, 2012 3:32 PM

Answers

  • It depends on the app. Most Xaml apps don't need to use GestureRecognizer, but can achieve full functionality either with the manipulation support built into controls or with the higher level Xaml manipulation events. The lower level GestureRecognizer is available if the app needs gesture support (such as cross-slide) which isn't exposed by the manipulation events.

    --Rob

    • Marked as answer by Leonard Friday, October 05, 2012 11:43 PM
    Friday, October 05, 2012 5:16 PM
    Owner