Reputation: 245
So, I've been making an XNA game and I've noticed that the window's fullscreen button is disabled. I want to enable it (not by changing FullScreen to true; I want the maximize button), but all the online answers I've been seeing say to use the System.Windows.Forms.Form class. However, I'm using Visual Studio 2010, so there is no System.Windows namespace. So, how do I do this? Is the Form class stored in a different namespace in Visual Studio 2010? Is there a variable that can do this (the Internet has very few answers on this topic...)?
Upvotes: 2
Views: 1090
Reputation: 421
Set Window.AllowUserResizing
to true in your Game
class. This allows resizing the window by dragging and enables the Maximize button.
The backbuffer is not automatically resized, but scaled to fit the resized window. You can listen to the Window.ClientSizeChanged
event and resize the backbuffer in your event handler.
Upvotes: 3