monogame-ui-grid

Installation
SKILL.md

MonoGame UI Grid Layout

The GridLayout container positions children at explicit row/column coordinates — identical to XAML's Grid. It is the most flexible layout container for complex UIs (settings screens, inventory tables, form layouts). For complete code templates, read references/ui-grid.md.

Assumed Contract

Extends UIContainer from monogame-ui-core. Implements Measure/Arrange from monogame-ui-layout. Follows the same no-LINQ, no-allocation rules inside layout methods.

Column and Row Definitions

Three sizing modes, same as XAML. Use the static shorthand methods on GridTrack:

Mode Syntax Behavior
Fixed GridTrack.Fixed(n) Exact pixel size
Auto GridTrack.Auto() Sized to the widest/tallest child in that column/row
Star GridTrack.Star(n) Proportional share of remaining space after fixed + auto

Add tracks to ColumnDefinitions / RowDefinitions before arranging children:

Installs
15
GitHub Stars
2
First Seen
May 20, 2026
monogame-ui-grid — alca259/monogame-skills