public override Size GetPreferredSize(ViewLayoutContext context)
{
// Get requested size of the control
Size size = (_control != null ? _control.GetPreferredSize(context.DisplayRectangle.Size) : Size.Empty);
// Return size with padding added on
return new Size(size.Width + DisplayPadding.Horizontal,
size.Height + DisplayPadding.Vertical);
}