Export (0) Print
Expand All

Creating a Full-Screen Game

Demonstrates how to start a game in full-screen mode.

Complete Sample

The code in this topic shows you the technique. You can download a complete code sample for this topic, including full source code and any additional supporting files required by the sample.

Creating a Full-Screen Game

To create a full-screen game

  1. Derive a class from Game.

  2. After creating the GraphicsDeviceManager, set its PreferredBackBufferWidth and PreferredBackBufferHeight to the desired screen height and width.

  3. Set IsFullScreen to true.

    this.graphics.PreferredBackBufferWidth = 480;
    this.graphics.PreferredBackBufferHeight = 800;
    this.graphics.IsFullScreen = true;

Community Additions

© 2014 Microsoft