Silverlight and XNA Framework for Windows Phone

[This documentation is preliminary and is subject to change.]

July 06, 2012

Applies to: Windows Phone 8 Developer Preview | Windows Phone OS 7.1

 

Windows Phone apps are written by using the XAML and XNA frameworks. This topic helps you to determine which framework you should choose for your app, or if you should use a combination of both.

This topic contains the following sections.

  • When to use XAML or the XNA Framework
  • XAML app development
  • XNA Framework app development
  • Combining XAML and the XNA Framework in a Windows Phone app

 

When to use XAML or the XNA Framework

The following table lists the criteria that you can use to determine whether you want to use XAML or the XNA Framework for your Windows Phone app.

Use XAML if…

Use the XNA Framework if…

Combine the XNA Framework and XAML if…

You want a XAML-based, event-driven app framework.

You want a high-performance game framework.

You want a XAML-based, event-driven app integrated with a high-performance game framework.

You want rapid creation of a Rich Internet Application-style user interface.

You want rapid creation of multi-screen 2D and 3D games.

You want to create a multi-screen 2D or 3D game that incorporates a Rich Internet Application-style user interface.

You want to use Windows Phone controls.

You want to manage art assets such as models, meshes, sprites, textures, effects, terrains, or animations in the XNA Content Pipeline.

You want to use Windows Phone controls along with art assets such as models, meshes, sprites, textures, effects, terrains, or animations in the XNA Content Pipeline.

You want to embed video inside your app.

You want to use XAML text rendering, including international text, instead of sprite fonts.

You want to use an HTML web browser control.

You want the page navigation model of a XAML app combined with the rich graphics power of an XNA Framework app.

XAML app development

XAML for Windows Phone class library topics are documented in the XAML section of MSDN. In that section, you can also find conceptual and how-to topics that can help you to understand the differences between the Windows and Windows Phone app platforms when using XAML.

The following links take you to topics in the XAML documentation.

To get started writing your first XAML app for Windows Phone, see XAML for Windows Phone.

XNA Framework app development

The XNA Framework class library is documented in the XNA Game Studio 4.0 section of MSDN. Also in that section are conceptual and how-to topics to help you create games for Windows Phone.

The following links take you to topics in the XNA Game Studio documentation.

Topic

Description

XNA Framework Class Library

Contains a list of classes, interfaces, and value types that are included in XNA Game Studio.

Developing Windows Phone Games

Describes how to use the XNA Game Studio environment to develop Windows Phone games.

To get started writing your first XNA Framework app, seeHow to create an XNA Framework app for Windows Phone. For more information about game development for Windows Phone and to participate in the community discussions, see XNA Game Studio and XNA Framework, XNA Game Studio Community Forums, and XNA Game Studio Team Blog.

Combining XAML and the XNA Framework in a Windows Phone app

In the past, you were forced to decide whether to use XAML or the XNA Framework to build your Windows Phone app. While some classes could be shared across frameworks, only one framework could be used for visuals. Starting with Windows Phone 7.5, you can combine XAML and the XNA Framework into a single app by using the new SharedGraphicsDeviceManager and the UIElementRenderer class.

For links to topics specific to Windows Phone and the XNA Framework, see XNA Framework and Windows Phone 8 development.