Share via


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.

Gesture Support in Windows Phone

For a full list of supported gestures, see Input for Windows Phone 8.

Manipulation events

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.

Event

Description

ManipulationStarted

This event occurs when the user starts a direct manipulation by placing their finger or fingers on the screen.

ManipulationDelta

This event occurs repeatedly while the user is moving their finger or fingers on the screen.

ManipulationCompleted

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

Elements that derive from UIElement, including controls, support gestures such as tap, double-tap, hold, pan, and flick. For more information, see the Input for Windows Phone 8 topic and the UIElement class.

Gesture Support in the XNA Framework

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.

GestureType

Description

Tap

A finger touches the screen and releases.

DoubleTap

This gesture represents two taps in succession.

Hold

A finger touches the screen and holds it in place for a brief period of time.

FreeDrag

A finger touches the screen and moves in any direction.

VerticalDrag

A finger touches the screen and moves in an up or down direction.

HorizontalDrag

A finger touches the screen and moves in a left or right direction.

DragComplete

Marks the end of a FreeDrag, VerticalDrag, or HorizontalDrag gesture.

Flick

A finger drags across the screen and is lifted up without stopping.

Pinch

Two fingers press on the screen and move around.

PinchComplete

This gesture marks the end of a Pinch gesture.

See Also

Other Resources

Navigation, orientation, and gestures for Windows Phone

XNA Framework and app development for Windows Phone 8