This document captures design and implementation notes for Center.
For end-user usage and examples, see Center.
Center is a ContentVisual and arranges only Content.Center : ContentVisualCenter uses ContentVisual.Content (and the usual Visual sizing/alignment properties), but it does not introduce
any new bindables of its own.
Center is purely a layout helper; it does not render anything itself.
Content is null: DesiredSize = (0,0).Content.Measure(constraints).Content is null: no-op.finalRect)Content.DesiredSizefinalRect:
x = finalRect.X + (finalRect.Width - w) / 2y = finalRect.Y + (finalRect.Height - h) / 2This means:
CenterCenter does not handle input and does not expose commands.
There is no CenterStyle. Visual appearance is determined entirely by the child.
There are no dedicated unit tests for Center at the time of writing.