Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Windows Phone 7.5 XNA Game Orientation in Mixed Mode

0.00/5 (No votes)
10 Jan 2013 1  
How to set orientation to landscape mode for XNA game in mixed mode (Silverlight & XNA)

Introduction

Maybe this will save someone some time.
 
When you create a Windows Phone Silverlight and XNA project, the XNA part will be set to Portrait mode.
To change it to Landscape, you need to:

  • Set orientation of XNA page to landscape
  • Replace in App.xaml:
    <xna:SharedGraphicsDeviceManager/>

    with:

    <xna:SharedGraphicsDeviceManager PreferredBackBufferWidth="800" 
    PreferredBackBufferHeight="480"  />

    if all of your XNA pages will be in this resolution. If not, you can set in code for each XNA page.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here