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

Tagged as

Go to top

Windows Phone 7.5 XNA Game Orientation in Mixed Mode

, 10 Jan 2013
Rate this:
Please Sign up or sign in to vote.
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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Pawel Gielmuda
Software Developer ABB
Poland Poland
No Biography provided

Comments and Discussions

 
QuestionReverse ? PinmemberAmitDey14-Oct-12 3:19 

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

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140922.1 | Last Updated 10 Jan 2013
Article Copyright 2011 by Pawel Gielmuda
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid