Table of Contents

Method CoercePosition

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

CoercePosition(PointD?, AbstractControl?)

Determines the effective position based on the specified position and the relative control.

public static PointD CoercePosition(PointD? position, AbstractControl? relativeTo)

Parameters

position PointD?

The position to evaluate. If null or equal to MinusOne, the current mouse position relative to relativeTo is returned.

relativeTo AbstractControl

The control relative to which the mouse position is calculated if position is null or MinusOne. Can be null.

Returns

PointD

The coerced position. If position is not null and not MinusOne, the value of position is returned.