Reputation: 43
Quick question for you all,
I'm trying to get into using the XNA Framework to develop Windows Phone 7.1 games, however when I create a project I can't get the app to take up the whole screen on the device emulator. Sample apps from the App Hub successfully take up the device's entire screen, but for some reason I can't get mine to do the same thing. You can basically see what I'm experiencing in the last image on this page: http://msdn.microsoft.com/en-us/library/ff472340%28v=vs.92%29.aspx (look carefully at the gap between the blue game scene and the screen casing)
I've scoured the internet for a solution but so far I haven't had any luck in finding an answer. I've tried setting isFullScreen to true, and also changing the preferredBackBufferWidth and height. Neither of these have worked so far.
Anyone who can help me on this gets an internet hi five.
Upvotes: 0
Views: 1324
Reputation: 843
I used in my code following code in constructor:
// Pre-autoscale settings.
_graphics.PreferredBackBufferWidth = 800;
_graphics.PreferredBackBufferHeight = 480;
_graphics.IsFullScreen = true;
_graphics.SupportedOrientations = DisplayOrientation.LandscapeLeft;
I hope it will help you.
Upvotes: 2
Reputation: 415
I have found that I had to set the IsFullScreen and the BackBuffer Width and height to 800x480 (depending on orientation). Are you looking at rendering in landscape or portrait?
Upvotes: 4