Window in full screen


Hello, how do I leave the game window in
full screen?


you can press ALT+Enter on the game window.


Thank you very much
This helped me a lot, but it has how to do in the code?


i used something like this:

    if (GoFullscreen)
        var gfxOutput = GraphicsAdapterFactory.Adapters[0].Outputs;
        var displayMode = gfxOutput[0].CurrentDisplayMode;

        var screenWidth = Math.Min(displayMode.Width, 1920);
        var maxHeight = displayMode.AspectRatio < 1.7f ? 1200 : 1080;
        var screenHeight = Math.Min(displayMode.Height, maxHeight);

        Game.GraphicsDeviceManager.PreferredBackBufferWidth = screenWidth;
        Game.GraphicsDeviceManager.PreferredBackBufferHeight = screenHeight;
        Game.GraphicsDeviceManager.IsFullScreen = true;

you can put this into some initialization code.