Skip to content

531035F8

Marcel Härtel edited this page Aug 19, 2023 · 1 revision

GraphicsDeviceControl Properties

Properties

AlwaysEnableKeyboardInput If enabled the Keyboard input will work even if the current control has no focus (mouse cursor is outside of the control).
BackColor Set the background color of this Control in the designer.
Components Get the GameComponentCollection.
ForeColor Set the foreground color of this Control in the designer.
GraphicsProfile Set the GraphicsProfile in the property grid during Design-Time (HiDef or Reach). You shouldn't change this during runtime!
IsMouseInsideControl Returns true when the mouse cursor is inside the control.
Services Get the GameServiceContainer.
SwapChainRenderTarget A swap chain used for rendering to a secondary GameWindow. Note: When working with different RenderTarget2D, you need to set the current render target back to the SwapChainRenderTarget as this is the real 'Back Buffer'. 'GraphicsDevice.SetRenderTarget(null)' will NOT work as you are doing usally in MonoGame. Instead use 'GraphicsDevice.SetRenderTarget(SwapChainRenderTarget)'. Otherwise you will see only a black control window.

See Also

Reference

GraphicsDeviceControl Class
MonoGame.Forms.NET.Controls Namespace

Clone this wiki locally