Table of Contents

Method CoercePosition

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

CoercePosition(PointD?, ref AbstractControl)

Calculates the position of a point relative to the platform control, adjusting for nested control locations as necessary. Control references are updated to point to the platform control.

protected virtual PointD? CoercePosition(PointD? position, ref AbstractControl control)

Parameters

position PointD?

The initial position to be coerced, relative to the specified control. Can be null to indicate an undefined position.

control AbstractControl

The control relative to which the position is specified. Must not be null.

Returns

PointD?

A PointD representing the position relative to the platform control, or null if the position cannot be determined.

Remarks

This method traverses the control hierarchy to adjust the position for nested controls. Override this method to customize how positions are coerced in derived classes.