Revisiting GestureRecognizer

GestureRecognizer has one mouse (and pen)-specific event not covered previously: Dragging. Whereas a single-finger touch-based swipe gesture generates series of CrossSliding events depending on its direction, the same motion from a mouse with any button down (or from a pen while in contact) generates a series of Dragging events instead.

Like CrossSliding, Dragging reports many different states to event handlers with an enumeration—this time called DraggingState. The pattern is the same: an event raised with a Started state, followed by many with a Continuing state, followed by one with a Completed state. Unlike CrossSliding, Dragging is reported for any direction.

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.