Grid Class
Package: GHIElectronics.Endpoint.UI
Namespace: GHIElectronics.Endpoint.UI
WPF-style Grid with ColumnDefinitions + RowDefinitions. Call Grid.SetDefinitions once with the column + row sizes, then call Grid.SetCell on each child. Sizes: positive = fixed pixels; 0 or negative = star (-1 = "", -2 = "2", ...).
public class Grid : Widget
Constructors
Grid(Widget parent)
public Grid(Widget parent)
Create a grid inside parent.
| Parameter | Type | Description |
|---|---|---|
parent | Widget | Containing widget. |
Methods
SetCell(Widget child, int column, int row, int columnSpan, int rowSpan)
public static void SetCell(Widget child, int column, int row, int columnSpan, int rowSpan)
Attach child to a cell in the grid.
SetDefinitions(int[] columns, int[] rows)
public void SetDefinitions(int[] columns, int[] rows)
Define column and row sizes. Positive values are fixed pixel widths; a negative value -n is a star share of weight n (-1 = *, -2 = 2*, ...). Zero is treated as star.
| Parameter | Type | Description |
|---|---|---|
columns | int[] | Column size definitions, left to right. |
rows | int[] | Row size definitions, top to bottom. |