Class GameWindow
An abstract window.
public abstract class GameWindow : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder- Inheritance
- 
      objectGameWindow
- Implements
- Derived
- Inherited Members
- Extension Methods
Fields
IsActivated
Indicate if the window is currently activated.
public bool IsActivatedField Value
Properties
AllowUserResizing
Gets or sets, user possibility to resize this window.
public abstract bool AllowUserResizing { get; set; }Property Value
ClientBounds
Gets the client bounds.
public abstract Rectangle ClientBounds { get; }Property Value
- Rectangle
- The client bounds. 
CurrentOrientation
Gets the current orientation.
public abstract DisplayOrientation CurrentOrientation { get; }Property Value
- DisplayOrientation
- The current orientation. 
Focused
Gets a value indicating whether this instance is in focus.
public abstract bool Focused { get; }Property Value
- bool
- trueif this instance is in focus; otherwise,- false.
FullscreenIsBorderlessWindow
Whether the fullscreen mode should be a borderless window matching the desktop size.
public bool FullscreenIsBorderlessWindow { get; set; }Property Value
Remarks
This flag is currently ignored on all game platforms other than SDL.
IsBorderLess
Gets or sets a value indicating whether this window has a border
public abstract bool IsBorderLess { get; set; }Property Value
- bool
- trueif this window has a border; otherwise,- false.
IsFullscreen
Switches between fullscreen and windowed mode.
public bool IsFullscreen { get; set; }Property Value
IsMinimized
Gets a value indicating whether this instance is minimized.
public abstract bool IsMinimized { get; }Property Value
- bool
- trueif this instance is minimized; otherwise,- false.
IsMouseVisible
Gets or sets a value indicating whether the mouse pointer is visible over this window.
public abstract bool IsMouseVisible { get; set; }Property Value
- bool
- trueif this instance is mouse visible; otherwise,- false.
NativeWindow
Gets the native window.
public abstract WindowHandle NativeWindow { get; }Property Value
- WindowHandle
- The native window. 
Opacity
Gets or sets the opacity of the window.
public abstract double Opacity { get; set; }Property Value
- double
- 1.0d is fully opaque, 0.0d is fully transparent. The value will automatically be clamped to [0.0d, 1.0d]. 
Remarks
The default value, if the window is null, is considered fully opaque (1.0d).
Position
Gets or sets the position of the window on the screen.
public virtual Int2 Position { get; set; }Property Value
PreferredFullscreenSize
The size the window should have when switching from windowed to fullscreen mode. To get the current actual size use ClientBounds.
public Int2 PreferredFullscreenSize { get; set; }Property Value
PreferredWindowedSize
The size the window should have when switching from fullscreen to windowed mode. To get the current actual size use ClientBounds. This gets overwritten when the user resizes the window.
public Int2 PreferredWindowedSize { get; set; }Property Value
Title
Gets or sets the title of the window.
public string Title { get; set; }Property Value
Visible
Gets or sets a value indicating whether this GameWindow is visible.
public abstract bool Visible { get; set; }Property Value
- bool
- trueif visible; otherwise,- false.
Methods
BeginScreenDeviceChange(bool)
public abstract void BeginScreenDeviceChange(bool willBeFullScreen)Parameters
- willBeFullScreenbool
CreateUserManagedMessageLoop()
public virtual IMessageLoop CreateUserManagedMessageLoop()Returns
EndScreenDeviceChange()
public void EndScreenDeviceChange()EndScreenDeviceChange(int, int)
public abstract void EndScreenDeviceChange(int clientWidth, int clientHeight)Parameters
Initialize(GameContext)
protected abstract void Initialize(GameContext gameContext)Parameters
- gameContextGameContext
OnActivated(object, EventArgs)
protected void OnActivated(object source, EventArgs e)Parameters
- sourceobject
- eEventArgs
OnClientSizeChanged(object, EventArgs)
protected void OnClientSizeChanged(object source, EventArgs e)Parameters
- sourceobject
- eEventArgs
OnClosing(object, EventArgs)
protected void OnClosing(object source, EventArgs e)Parameters
- sourceobject
- eEventArgs
OnDeactivated(object, EventArgs)
protected void OnDeactivated(object source, EventArgs e)Parameters
- sourceobject
- eEventArgs
OnDisableFullScreen(object, EventArgs)
protected void OnDisableFullScreen(object source, EventArgs e)Parameters
- sourceobject
- eEventArgs
OnFullscreenToggle(object, EventArgs)
protected void OnFullscreenToggle(object source, EventArgs e)Parameters
- sourceobject
- eEventArgs
OnOrientationChanged(object, EventArgs)
protected void OnOrientationChanged(object source, EventArgs e)Parameters
- sourceobject
- eEventArgs
SetSize(Int2)
Sets the size of the client area and triggers the ClientSizeChanged event. This will trigger a backbuffer resize too.
public void SetSize(Int2 size)Parameters
- sizeInt2
SetSupportedOrientations(DisplayOrientation)
protected abstract void SetSupportedOrientations(DisplayOrientation orientations)Parameters
- orientationsDisplayOrientation
SetTitle(string)
protected abstract void SetTitle(string title)Parameters
- titlestring
Events
Activated
Occurs when this window is activated.
public event EventHandler<EventArgs> ActivatedEvent Type
ClientSizeChanged
Occurs when device client size is changed.
public event EventHandler<EventArgs> ClientSizeChangedEvent Type
Closing
Occurs before the window gets destroyed.
public event EventHandler<EventArgs> ClosingEvent Type
Deactivated
Occurs when this window is deactivated.
public event EventHandler<EventArgs> DeactivatedEvent Type
FullscreenChanged
Occurs when device fullscreen mode is changed.
public event EventHandler<EventArgs> FullscreenChangedEvent Type
OrientationChanged
Occurs when device orientation is changed.
public event EventHandler<EventArgs> OrientationChanged