protected override void LayoutChildren(double x, double y, double width, double height)
{
if (!HasSystemPadding)
{
base.LayoutChildren(x, y, width, height);
return;
}
var systemPadding = SystemPadding;
x += systemPadding.Left;
y += systemPadding.Top;
width -= systemPadding.Left + systemPadding.Right;
height -= systemPadding.Top + systemPadding.Bottom;
base.LayoutChildren(x, y, width, height);
}