Table of Contents

Method ShowContextMenu

Namespace
Alternet.UI
Assembly
Alternet.UI.Maui.dll

ShowContextMenu(ContextMenu?, View?, HVDropDownAlignment?)

Displays the context menu for the specified view, if supported.

public static bool ShowContextMenu(ContextMenu? menu, View? view, HVDropDownAlignment? align = null)

Parameters

menu ContextMenu

The context menu to display. If null, the method will attempt to use the context menu associated with the view.

view View

The view for which to display the context menu. This can be a ContentView, ControlView, or another supported view type.

align HVDropDownAlignment?

The alignment of the context menu inside the container.

Returns

bool

true if the context menu was successfully shown for the specified view; otherwise, false.

Remarks

If the specified view is a ContentView, the method attempts to display the context menu for its content. Only views that are or contain a ControlView support displaying a context menu.