Window
Introduction
Code Example
var window = new Window();
window.Anchor(Gum.Wireframe.Anchor.Center);
window.Width = 300;
window.Height = 200;
window.AddToRoot();
var textInstance = new Label();
textInstance.Dock(Gum.Wireframe.Dock.Top);
textInstance.Y = 24;
textInstance.Text = "Hello I am a message box";
window.AddChild(textInstance);
var button = new Button();
button.Anchor(Gum.Wireframe.Anchor.Bottom);
button.Y = -10;
button.Text = "Close";
window.AddChild(button.Visual);
button.Click += (_, _) =>
{
window.RemoveFromRoot();
};

Preventing Sizing and Moving
Code Example: Disabling Resizing with ResizeMode
Code Example: Forced Docking

Last updated
Was this helpful?

