Table of Contents

Method CoerceBounds

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

CoerceBounds(RectD)

Adjusts the specified rectangle to conform to minimum and maximum size constraints, and optionally restricts its position based on MinimumLocation.

protected virtual RectD CoerceBounds(RectD value)

Parameters

value RectD

The input bounds to coerce.

Returns

RectD

A RectD adjusted to fit within configured size and positional constraints.

Remarks

This method ensures that the rectangle's dimensions respect the MinimumSize and MaximumSize limits. If MinimumLocation is defined, the rectangle's top-left corner is coerced to remain at or below the specified minimum location.