Table of Contents

Method AlignRectInRect

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

AlignRectInRect(bool, RectD, RectD, CoordAlignment, bool)

Aligns vertical or horizontal coordinates of the specified rectangle in the container using the alignment options.

public static RectD AlignRectInRect(bool vert, RectD rect, RectD container, CoordAlignment alignment, bool shrinkSize = true)

Parameters

vert bool

Whether to align vertical or horizontal coordinate.

rect RectD

Rectangle to align.

container RectD

Container rectangle.

alignment CoordAlignment

Alignment to apply.

shrinkSize bool

Whether to shrink size of the rectangle to fit in the container. Optional. Default is true. Only width (when vert is false) or height (when vert is true) is shrinked.

Returns

RectD

AlignRectInRect(RectD, RectD, HorizontalAlignment?, VerticalAlignment?, bool)

Aligns the specified rectangle in the container using horizontal and vertical alignment options.

public static RectD AlignRectInRect(RectD rect, RectD container, HorizontalAlignment? horz, VerticalAlignment? vert, bool shrinkSize = true)

Parameters

rect RectD

Rectangle to align.

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.

Returns

RectD