GridContainer
A grid with a specified column count.
Columns is a positive column count, default 1. Eligible child Controls fill rows in order; RTL affects horizontal direction. Column widths and row heights depend on participants and available space rather than a separate percentage per cell.
This is not width-driven automatic wrapping: use FlowContainer for that. Non-Control, TopLevel and hidden items do not occupy ordinary cells. Changing Columns requests layout; an immediately read child Size can still be stale.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
GridContainerConstructor
public GridContainer();Creates a one-column grid. Set Columns >= 1 for another count.
Properties1
ColumnsProperty
public int Columns { get; set; }Positive column count, default 1. A change requests relayout; not automatically chosen from width.
Methods2
GetColumnsint
public int GetColumns();Positive column count, default 1. A change requests relayout; not automatically chosen from width.
intCurrent positive column count.
SetColumnsvoid
public void SetColumns(int columns);Positive column count, default 1. A change requests relayout; not automatically chosen from width.
| Name | Type | Default |
|---|---|---|
columns | int | — |
columnsInteger >= 1; zero and negative values are rejected.
Theme properties
These are Theme resource keys, not C# properties. Use the matching Control GetTheme…() and AddTheme…Override() methods for each value type.
| Key and type | Description |
|---|---|
h_separationint | The horizontal separation of child nodes. Default:4 |
v_separationint | The vertical separation of child nodes. Default:4 |