protected virtual void LayoutChild(IWindowsElement child, Rectangle bounds) { if ((child != null) && child.GetVisible()) { child.Layout(Control.DisplayRectangle); } }
protected override void LayoutChild(IWindowsElement child, Rectangle bounds) { if ((child != null) && child.GetVisible()) { switch (TitleAlignment) { case TitleAlignment.Top: bounds.Height -= _labelPixelSize.Height + LabelVSpacing; break; case TitleAlignment.Left: bounds.Width -= _labelPixelSize.Width + LabelHSpacing; break; } child.Layout(new Rectangle(Control.DisplayRectangle.Location, bounds.Size - (Control.Size - Control.DisplayRectangle.Size))); } }