| name | gum-forms-controls |
| description | Gum Forms controls (Button, Label, TextBox, CheckBox, ListBox, StackPanel…) vs raw visuals, and the state/category styling system. Triggers: adding a button/textbox/list, WPF-style properties not working, IsVisible, styling a control, DefaultVisuals. |
Gum Forms Controls
Forms controls are interactive UI classes whose names mirror WPF (Button,
CheckBox, TextBox, …), but they are laid out and rendered by Gum, not
WPF. Reach for a Forms control for anything the player clicks, types in, or
scrolls. For non-interactive HUD/decoration, use raw visuals instead (see
below). Docs: https://docs.flatredball.com/gum/code/controls.
Common controls
Button, ToggleButton, RadioButton, CheckBox, Label, TextBox,
PasswordBox, ComboBox, ListBox, Slider, ScrollBar, ScrollViewer,
StackPanel, Panel, Menu, Window, Splitter.
Using a control in code
using Gum.Forms.Controls;
var button = new Button();
button.Text = "Play";
button.AddToRoot();
button.Click += (_, _) => StartGame();
Text-bearing controls share this shape — new Label(), , etc.
all expose . Set position/size with Gum's unit system (see
), not WPF layout.