How to start in full screen in Monogame?

There are two ways to make the application fullscreen. One is by setting the IsFullScreen property, the other is by calling the ToggleFullScreen Method.

Keep in mind that, according to the documentation, if you change the property during initialization this will automatically set fullscreen mode. But when changing the property, not in initialization, that you need to call the ApplyChanges method.

// probably already defined
graphics = new GraphicsDeviceManager(this);

// ...

graphics.IsFullScreen = true;

// don't forget to call ApplyChanges, if you are not in the Initialize method
graphics.ApplyChanges();
// probably already defined 
graphics = new GraphicsDeviceManager(this);

// ...

graphics.ToggleFullScreen();

This is the right way with monogame

GraphicsDeviceManager graphics;
graphics = new GraphicsDeviceManager(this);
graphics.ToggleFullScreen();

You can set the IsFullscreen property to true.

//you likely already have this line (or similar)
graphics = new GraphicsDeviceManager(this);

//set the GraphicsDeviceManager's fullscreen property
graphics.IsFullScreen = true;

Tags:

C#

Wpf

Monogame