====== TUI Layout ====== Anchoring-first responsive layout for TUI applications. Anchoring is the **default mode** - every control behaves correctly on terminal resize without special containers. ===== Basic Principle ===== Anchoring-first means: - Terminal resize must not break layout, focus, or rendering - Controls maintain stable spatial relationships - Predictable expansion/shrinking rules ===== Anchor Semantics ===== ==== Available Anchors ==== | Anchor | Meaning | ^ Left | Distance to left edge stays constant | ^ Top | Distance to top edge stays constant | ^ Right | Distance to right edge stays constant | ^ Bottom | Distance to bottom edge stays constant | ==== Combinations ==== Default: Left + Top → Position stays stable, size constant Left + Right: → Width stretches/shrinks with parent width Top + Bottom: → Height stretches/shrinks with parent height All four (Left + Top + Right + Bottom): → Rect stretches in both directions No Anchors: → Treat as Left + Top (no "floating" ambiguity) ==== PXAML Examples ====