Gesture support for Windows Phone 8
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Touch gestures are the primary method for a user to interact with a Windows Phone. A touch gesture is defined as a user-initiated movement with one or more fingers on a touch screen. Tapping a UI element such as a push button is an example. With support for touch input you can create compelling, interactive end-user apps. This topic summarizes gesture systems and provides links to topics that offer implementation guidance.
This topic contains the following sections.
For a full list of supported gestures, see Input for Windows Phone 8.
You process touch input by handling manipulation events. When you handle these events, you can move and scale objects in response to touch and multi-touch input. The events are described in the following table.
This event occurs when the user starts a direct manipulation by placing their finger or fingers on the screen.
This event occurs repeatedly while the user is moving their finger or fingers on the screen.
This event occurs when the user removed their finger or fingers from the screen
For implementation guidance about how to handle these manipulation events, see How to handle manipulation events for Windows Phone 8. The linked topic contains instructions for creating a simple app that responds to single and multi-touch input.
Gesture support in UI elements
The XNA framework offers a robust touch gesture system for developing apps that target Windows Phone OS 7.1. Developers can leverage this built-in gesture system instead of implementing one from scratch. The following XNA gestures are supported in apps that target Windows Phone OS 7.1.
A finger touches the screen and releases.
This gesture represents two taps in succession.
A finger touches the screen and holds it in place for a brief period of time.
A finger touches the screen and moves in any direction.
A finger touches the screen and moves in an up or down direction.
A finger touches the screen and moves in a left or right direction.
Marks the end of a FreeDrag, VerticalDrag, or HorizontalDrag gesture.
A finger drags across the screen and is lifted up without stopping.
Two fingers press on the screen and move around.
This gesture marks the end of a Pinch gesture.