GameWindow

class GameWindow : System.Object
bool AllowUserResizing
readonly Rectangle ClientBounds
bool AllowAltF4

Gets or sets a bool that enables usage of Alt+F4 for window closing on desktop platforms. Value is true by default.

Point Position

The location of this window on the desktop, eg: global coordinate space which stretches across all screens.

readonly DisplayOrientation CurrentOrientation
readonly System.IntPtr Handle
readonly string ScreenDeviceName
string Title

Gets or sets the title of the game window.

bool IsBorderless

Determines whether the border of the window is visible. Currently only supported on the WinDX and WinGL/Linux platforms.

public void add_ClientSizeChanged(System.EventHandler<EventArgs> value)
Parameters:
  • value (System.EventHandler<EventArgs>) –
public void remove_ClientSizeChanged(System.EventHandler<EventArgs> value)
Parameters:
  • value (System.EventHandler<EventArgs>) –
public void add_OrientationChanged(System.EventHandler<EventArgs> value)
Parameters:
  • value (System.EventHandler<EventArgs>) –
public void remove_OrientationChanged(System.EventHandler<EventArgs> value)
Parameters:
  • value (System.EventHandler<EventArgs>) –
public void add_ScreenDeviceNameChanged(System.EventHandler<EventArgs> value)
Parameters:
  • value (System.EventHandler<EventArgs>) –
public void remove_ScreenDeviceNameChanged(System.EventHandler<EventArgs> value)
Parameters:
  • value (System.EventHandler<EventArgs>) –
public void add_TextInput(System.EventHandler<TextInputEventArgs> value)
Parameters:
  • value (System.EventHandler<TextInputEventArgs>) –
public void remove_TextInput(System.EventHandler<TextInputEventArgs> value)
Parameters:
  • value (System.EventHandler<TextInputEventArgs>) –
public abstract void BeginScreenDeviceChange(bool willBeFullScreen)
Parameters:
  • willBeFullScreen (bool) –
public abstract void EndScreenDeviceChange(string screenDeviceName, int clientWidth, int clientHeight)
Parameters:
  • screenDeviceName (string) –
  • clientWidth (int) –
  • clientHeight (int) –
public void EndScreenDeviceChange(string screenDeviceName)
Parameters:
  • screenDeviceName (string) –
void OnClientSizeChanged()
abstract void SetSupportedOrientations(DisplayOrientation orientations)
Parameters:
  • orientations (Microsoft.Xna.Framework.DisplayOrientation) –
protected abstract void SetTitle(string title)
Parameters:
  • title (string) –
public GameWindow Create(Game game, int width, int height)
Parameters:
  • game (Microsoft.Xna.Framework.Game) –
  • width (int) –
  • height (int) –