Table of Contents

Method ShowAtFactory

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

ShowAtFactory(AbstractControl, PointD?, IMenuFactory?)

Displays the context menu at the specified position using the provided control and menu factory.

public virtual void ShowAtFactory(AbstractControl control, PointD? position = null, IMenuFactory? factory = null)

Parameters

control AbstractControl

The control associated with the context menu. This parameter cannot be null.

position PointD?

The position where the context menu should be displayed, or null to use the default position.

factory IMenuFactory

The menu factory used to create and manage the context menu, or null to use the default factory.

Remarks

If the control is null or the menu contains no items, the method does nothing. If the factory is not provided, the default factory is used. The method raises the Opening event before displaying the menu, allowing the operation to be canceled. When the menu is closed, the Closing event is raised.