1 out of 1 rated this helpful - Rate this topic

Gesture Support for Windows Phone

Windows Phone

March 23, 2012

Touch gestures are the primary method for a user to interact with a Windows Phone, requiring a user-initiated movement with single or multiple fingers on a touch screen. Tapping a UI element such as a push button is an example. Developers can implement gesture support in their application using either the Silverlight or XNA frameworks. For more information about how you can use the Silverlight or XNA frameworks to develop Windows Phone applications, see The Silverlight and XNA Frameworks for Windows Phone. Each framework offers unique ways to handle touch input to create compelling, interactive end user applications. This topic will summarize both the Silverlight and XNA gesture systems and provide links to topics and articles offering implementation guidance.

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

Silverlight for Windows Phone allows you to process touch input by using manipulation events. By using 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. This topic will provide instruction for creating a simple application that responds to single and multi-touch input.

Note Note:

Silverlight 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 topic and the UIElement class.

The XNA framework offers a robust touch gesture system for developing applications. Developers can leverage this built-in gesture system instead of implementing one from scratch. The following XNA gestures are supported in Windows Phone.

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.

The following list provides useful topics and articles for implementing gesture support in an XNA application:

Did you find this helpful?
(1500 characters remaining)