Click here to Skip to main content
Click here to Skip to main content

Windows Phone 7.5 XNA Game Orientation in Mixed Mode

By , 10 Jan 2013
 

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Pawel Gielmuda
Software Developer ABB
Poland Poland
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
QuestionReverse ?memberAmitDey14 Oct '12 - 3:19 
Shouldn't this be PreferredBackBufferWidth="800" PreferredBackBufferHeight="480"

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web03 | 2.6.130516.1 | Last Updated 10 Jan 2013
Article Copyright 2011 by Pawel Gielmuda
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid