Switch GraphicsDeviceManager size

Hello,
i do a video game within a lot “battle map”, maps wich are integraly on the screen, same bomberman but not same size.
I would like than the resolution graphicsDeviceManager.PreferredBackBufferWidth and graphicsDeviceManager.PreferredBackBufferHeight can to be switch same time the size of the maps.

exemple :
The “battle map 1” have a 800600 size, so graphicsDeviceManager.PreferredBackBufferWidth = 800 and graphicsDeviceManager.PreferredBackBufferHeight = 600
and “battle map 2” have a 1200
500 size, so i need to switch graphicsDeviceManager.PreferredBackBufferWidth at 1200 and graphicsDeviceManager.PreferredBackBufferHeight at 500

Sorry for my english i hope you will understand.
Thanks you for answers.

It seems you already have it figured out :stuck_out_tongue: Did you have a question about this?
Note that after changing the PreferredBackBufferWidth or Height you should call GraphicsDeviceManager.ApplyChanges to actually change the back buffer and window size.

1 Like

Lol perfect you answer my question, i dont understand why we cant change that without this method.