Gestures

From the pointer events alone, it would take quite a bit of code to reliably detect user gestures such as press-and-hold, cross-slide item selection, and double taps. Even detecting a proper tap is more complicated than you might think. Furthermore, having apps write such code would be a recipe for disastrous user experiences because of the lack of consistency that would result.

Fortunately, Windows has a gesture recognizer that performs calculations based on the raw pointer events and raises appropriate additional events when it recognizes standard gestures. For example, if a user briefly touches a finger on a touchscreen then releases it, we already know that this causes a PointerPressed event to be raised followed by a PointerReleased ...

Get Universal Windows® Apps with XAML and C# Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.