Table of Contents

Method SetContextMenu

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

SetContextMenu(View?, ContextMenuStrip)

Sets the context menu for the specified view. If the view is a ControlView, its context menu is assigned directly. Otherwise, the ContextMenuStrip is converted to MenuFlyout and assigned to the view.

public static MenuFlyout? SetContextMenu(View? view, ContextMenuStrip menu)

Parameters

view View

The View to set the context menu for.

menu ContextMenuStrip

The ContextMenu to set as the context menu.

Returns

MenuFlyout

A MenuFlyout representing the context menu.