GestureType Enumeration
Contains values that represent different multitouch gestures that can be detected by TouchPanel.ReadGesture.
Namespace: Microsoft.Xna.Framework.Input.Touch
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
[FlagsAttribute]
public enum GestureType
Members
Member name | Description | |
---|---|---|
None | Represents no gestures. |
|
Tap | The user briefly touched a single point on the screen. |
|
DoubleTap | The user tapped the screen twice in quick succession. This always is preceded by a Tap gesture. If the time between taps is too great to be considered a DoubleTap, two Tap gestures will be generated instead. |
|
Hold | The user touched a single point on the screen for approximately one second. This is a single event, and not continuously generated while the user is holding the touchpoint. |
|
HorizontalDrag | The user touched the screen, and then performed a horizontal (left to right or right to left) gesture. |
|
VerticalDrag | The user touched the screen, and then performed a vertical (top to bottom or bottom to top) gesture. |
|
FreeDrag | The user touched the screen, and then performed a free-form drag gesture. |
|
Pinch | The user touched two points on the screen, and then converged or diverged them. Pinch behaves like a two-finger drag. When this gesture is enabled, it takes precedence over drag gestures while two fingers are down. |
|
Flick | The user performed a touch combined with a quick swipe of the screen. Flicks are positionless. The velocity of the flick can be retrieved by reading the Delta member of GestureSample. |
|
DragComplete | A drag gesture (VerticalDrag, HorizontalDrag, or FreeDrag) was completed. This signals only completion. No position or delta data is valid for this sample. |
|
PinchComplete | A pinch operation was completed. This signals only completion. No position or delta data is valid for this sample. |
Remarks
These values can be combined when reading them from, or writing them to, TouchPanel.EnabledGestures.
See Also
Tasks
Detecting Gestures on a Multitouch Screen (Windows Phone)
Working with Touch Input (Windows Phone)
Reference
TouchPanel.ReadGesture Method
TouchPanel.IsGestureAvailable Property
Microsoft.Xna.Framework.Input.Touch Namespace
Platforms
Xbox 360, Windows 7, Windows Vista, Windows XP