Table of Contents

Method GetDropDownPosition

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

GetDropDownPosition(SizeD, SizeD, HVDropDownAlignment?)

Calculates the position of a dropdown relative to a specified SizeD.

public static PointD GetDropDownPosition(SizeD ownerSize, SizeD popupSize, HVDropDownAlignment? position = null)

Parameters

ownerSize SizeD

The SizeD used as the reference for positioning the dropdown.

popupSize SizeD

Size of the drop-down control.

position HVDropDownAlignment?

An optional alignment specifying the horizontal and vertical position of the dropdown relative to the SizeD. If null, the dropdown is positioned at the bottom-left corner.

Returns

PointD

A PointD representing the calculated position of the dropdown.

Remarks

The position parameter allows fine-grained control over the dropdown's alignment. For example, setting the horizontal alignment to Center and the vertical alignment to Top will position the dropdown at the center of the rectangle's top edge.