Method AlignInRect
AlignInRect(RectD, HorizontalAlignment?, VerticalAlignment?, bool)
Aligns control in the specified container rectangle using horizontal and vertical alignment options.
public virtual void AlignInRect(RectD container, HorizontalAlignment? horz, VerticalAlignment? vert, bool shrinkSize = true)
Parameters
containerRectDContainer rectangle.
horzHorizontalAlignment?Horizontal alignment.
vertVerticalAlignment?Vertical alignment.
shrinkSizeboolWhether to shrink size of the rectangle to fit in the container. Optional. Default is
true.
Remarks
This method changes Bounds so default layout must be disabled before using it. You can disable default layout using IgnoreLayout property of the control.