Table of Contents

Method ShowInsideControl

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

ShowInsideControl(AbstractControl, AbstractControl?, PointD?, Action?, HVDropDownAlignment?)

Displays the context menu inside the specified container at the given position. Uses InnerPopupToolBar as the host control.

public virtual void ShowInsideControl(AbstractControl container, AbstractControl? source = null, PointD? position = null, Action? onClose = null, HVDropDownAlignment? align = null)

Parameters

container AbstractControl

The container in which the context menu will be displayed. This parameter cannot be null.

source AbstractControl

The control that triggered the context menu.

position PointD?

The position within the container where the context menu should be displayed. If null, the current mouse position relative to the container is used.

onClose Action

The action to be invoked when the context menu is closed.

align HVDropDownAlignment?

The alignment of the context menu within the container. If null, the default alignment Center is used if position is not specified.

Remarks

If the context menu is not already hosted within a InnerPopupToolBar, a new instance of InnerPopupToolBar is created and configured as the host. The control is positioned within the container, ensuring it remains visible within the container's bounds.