This document captures design and implementation notes for Padder.
For end-user usage and examples, see Padder.
Border)Padder : ContentVisualPadder()Padder(Visual content)Padder(Func<Visual> contentFactory)
Padding : Thickness
0 per side when combined with Inset.protected virtual Thickness Inset
Thickness.Zero).Padder only affects layout; it does not render anything itself.
Internally, Padder uses:
EffectivePadding = max(0, Padding + Inset) per sideThis allows derived controls to reserve internal chrome space while still allowing user padding.
EffectivePadding.Horizontal/Vertical from the parent max constraints.Content with these inner constraints (or treats content as SizeHints.Fixed(Size.Zero) when null).SizeHints as ContentHints + EffectivePadding, preserving the child’s flex grow/shrink factors.x = finalRect.X + EffectivePadding.Lefty = finalRect.Y + EffectivePadding.Topwidth = max(0, finalRect.Width - EffectivePadding.Horizontal)height = max(0, finalRect.Height - EffectivePadding.Vertical)Padder does not handle input and does not expose commands.
There is no PadderStyle. Visual appearance is determined entirely by the child.
Tests that lock down current behavior:
src/XenoAtom.Terminal.UI.Tests/PadderMeasureArrangeTests.cs