Layout#
- class Layout#
Arranges the elements of a panel automatically, so that they do not have to be positioned one by one. See
Panel.AddHorizontalLayout,Panel.AddVerticalLayoutandPanel.AddGridLayout.- float Spacing { get; set; }#
The gap left between the elements, in pixels. A grid layout uses it in both directions.
- Game Scenes:
All
- TextAnchor ChildAlignment { get; set; }#
Where the elements are placed within the space the layout has to fill.
- Game Scenes:
All
- Tuple<double, double> CellSize { get; set; }#
The size of each cell of a grid layout, in pixels.
- Game Scenes:
All
Note
Only applies to a grid layout. Throws an exception for the other layouts, whose elements are sized individually using their layout elements.
- GridConstraint Constraint { get; set; }#
What fixes the shape of a grid layout.
- Game Scenes:
All
Note
Only applies to a grid layout. Throws an exception for the other layouts.
- int ConstraintCount { get; set; }#
The number of columns or rows that
Layout.Constraintfixes, ignored when the constraint isGridConstraint.Flexible.- Game Scenes:
All
Note
Only applies to a grid layout. Throws an exception for the other layouts.