avalonia-layout
Installation
SKILL.md
Avalonia Layout
Overview
Avalonia layout uses a two-pass measure/arrange system. Every control has Margin (space outside the control), Padding (space inside), HorizontalAlignment, and VerticalAlignment. Layout is done with Panel subclasses — choose the panel that matches the arrangement model.
Panel Quick Reference
| Panel | Arranges children | Use when |
|---|---|---|
Grid |
In defined rows/columns | Complex layouts, forms, dashboards |
StackPanel |
Linearly (H or V) | Toolbars, lists, vertical forms |
WrapPanel |
Linearly, wraps to next row/col | Tag clouds, icon grids, badge lists |
DockPanel |
Docked to edges + fill center | App shell, menu+content+statusbar |
Canvas |
Absolute x/y positions | Drawing surfaces, overlays, diagrams |
UniformGrid |
Equal-size cells, auto rows/cols | Grids of same-size items |
RelativePanel |
Relative to siblings or panel | Adaptive layouts, dynamic alignment |