Search code examples
c#xnawindows-phone

Display dialog box in landscape


Using Xna for a game on windows phone, and at the beginning I have a prompt for if the user wants to continue listening to music via Microsoft.Xna.GamerServices.Guide.BeginShowMessageBox().

However, this prompt displays in portrait while my game runs in landscape, is there a setting I'm unable to find which would allow me to landscape my dialog box?


Solution

  • Use DisplayOrientation property.

    GraphicsDevice.PresentationParameters.DisplayOrientation = DisplayOrientation.LandscapeRight;
    

    Property cannot be set, before content is loaded and works on Windows Phones platfrom only (not on XBox and Windows).