public override Size GetPreferredSize(ViewLayoutContext context)
{
// Get the preferred size of the contained content
Size preferredSize = base.GetPreferredSize(context);
// Add on the padding we need around edges
return new Size(preferredSize.Width + _preferredPadding.Horizontal,
preferredSize.Height + _preferredPadding.Vertical);
}