O'Reilly logo

Windows Phone 7 XNA Cookbook by Zheng Yang

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating your first touch application/game

For Windows Phone 7, touchscreen is the most convenient way of allowing the user to interact with your game. The screen, where all actions and gestures take place, is 800 * 480 for landscape mode and 480 * 800 for portrait mode. Based on the hardware, Windows Phone 7 will give the player a hand to actually touch the game as it unfolds, bringing it to life. In this recipe, you will discover how Windows Phone 7 touchscreen works and see how to get the benefits of using this functionality.

Getting ready

For Windows Phone touchscreen interactions, the most common behavior is Tap. When your finger touches the touchscreen, the tap event will be triggered. In XNA, the touchscreen input is referred to as a TouchPanel ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required