Question

Looking for a way to detect finger gestures in my Windows Mobile applications. Main goal: detect when user gestures a left or right swipe across the screen. Similar to the swipe motion used to unlock an iPhone.

Was it helpful?

Solution

Set a flag when a MouseDown event occurs, storing the position as well.

  1. If you wish to react before the user removes his finger from the screen, listen to MouseMove events, and check the direction and distance relative to the MouseDown event that you require for an action to take place.
  2. If you wish to wait for the user to remove his finger from the screen first, listen to MouseUp events and check the direction and distance.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top