This document captures design and implementation notes for StatusBar.
For end-user usage and examples, see StatusBar.
VisualVStack, Footer, or DockLayout)StatusBar is a more "classic" primitive; new apps often prefer Header/Footer for richer layout.
src/XenoAtom.Terminal.UI/Controls/StatusBar.cssrc/XenoAtom.Terminal.UI/Styling/StatusBarStyle.cssrc/XenoAtom.Terminal.UI.Tests/StatusBarRenderingTests.cssamples/ControlsDemo/Demos/StatusBarDemo.csStatusBar : Visual (sealed)HorizontalAlignment = Align.StretchVerticalAlignment uses the Visual default (typically Align.Start)LeftText : Visual? (bindable)RightText : Visual? (bindable)The children are the two slot visuals when present.
There are no events and no input handling.
StatusBar is a single-row control (height 1).
Measurement rules:
LeftText and RightText are measured with:
[0 .. Infinite][0 .. 1]min = (0, 1)natural = clamp(requiredWidth, 1)SizeHints.FlexX(...))StatusBar arranges each slot into a 1-row rectangle:
x = finalRect.Xwidth = min(finalRect.Width, left.DesiredSize.Width)width = min(finalRect.Width, right.DesiredSize.Width)x = finalRect.X + (finalRect.Width - width)Important: there is no collision resolution. If the total content width exceeds the available width, the arranged rectangles can overlap. The final visual result depends on rendering order (children render after the parent fill).
The StatusBar renders a single row background fill across Bounds.Width using StatusBarStyle.Resolve(theme).
Children then render on top. Since the background fill writes a full row of styled spaces, children that render with
Style.None inherit the status bar baseline styling.
StatusBarStyle exposes:
Background : Color?Foreground : Color?Resolve behavior:
theme.Foreground when not specifiedTextStyle.Bold is always appliedStatusBarRenderingTests.StatusBar_Renders_Left_And_Right validates that both slots appear when hosted in a layout.Markup slots with Wrap = false, embedded in a bordered panel.