Table of Contents

Method AlignInRect

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

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

container RectD

Container rectangle.

horz HorizontalAlignment?

Horizontal alignment.

vert VerticalAlignment?

Vertical alignment.

shrinkSize bool

Whether 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.