This document specifies the current behavior and design of the DockLayout control as implemented.
For end-user usage and examples, see DockLayout.
Top region (header/toolbars)Bottom region (footer/status/command bar)Content region that fills the remaining heightTop : Visual?Bottom : Visual?Content : Visual?HorizontalAlignment = Align.Stretch, VerticalAlignment = Align.Stretch.src/XenoAtom.Terminal.UI/Controls/DockLayout.cssamples/ControlsDemo/Demos/DockLayoutDemo.cssrc/XenoAtom.Terminal.UI.Tests/AppChromeTests.cssrc/XenoAtom.Terminal.UI.Tests/CommandBarRenderingTests.cssrc/XenoAtom.Terminal.UI.Tests/StatusBarRenderingTests.csDockLayout is a purely layout-oriented control: it does not render anything itself and has no input handling.
Top, Content, Bottom (when present).Measure is performed in this order:
Top is measured with (maxWidth, remainingMaxHeight).
top.MeasureHints.Natural.Height.Bottom is measured with (maxWidth, remainingMaxHeight).
bottom.MeasureHints.Natural.Height.Content is measured with whatever height remains.The resulting SizeHints are derived by combining children:
Min/Natural are the max of the corresponding widths across regions.Max is infinite if any child can grow infinitely, otherwise the max of the child max widths.Min/Natural are the sum of the region heights.Max is infinite if any child max height is infinite, otherwise it is the sum of child max heights.growY / shrinkY are taken from the Content region (top/bottom are considered fixed chrome in Y).growX / shrinkX are the max across all regions.The “remaining height” logic means Top and Bottom get measurement priority. This is intentional: app chrome should
reserve space before measuring the main content.
Arrange is also prioritized for chrome:
Top is arranged at the top using min(remainingHeight, top.DesiredSize.Height).Bottom is arranged at the bottom using min(remainingHeight, bottom.DesiredSize.Height).Content is arranged in the remaining vertical space between Top and Bottom (may be 0 height).All regions receive the full available width.
DockLayout has no dedicated style. It relies on the child visuals to provide styling (borders, background fills, etc.).
None. Input is handled by the contained visuals.
DockLayoutDemo shows the typical “Top/Content/Bottom” behavior with simple bordered regions.AppChromeTests uses DockLayout to ensure Header/Footer render around a content body.DockLayout as the root container for CommandBar/StatusBar scenarios.TopGap / BottomGap convenience spacing (can already be achieved with wrappers).