Table of Contents

Class InnerMenuFactory

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

Provides functionality for creating, managing, and interacting with menus, including context menus, main menus, and menu items.

public class InnerMenuFactory : DisposableObject, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IDisposable, IBaseObject, IMenuFactory
Inheritance
InnerMenuFactory
Implements

Remarks

The InnerMenuFactory class implements the IMenuFactory interface, offering methods to create and destroy menus and menu items, as well as to configure their properties such as text, shortcuts, and submenus. It also provides event handling for menu interactions, such as clicks, highlights, and open/close events.

This class is designed to be extensible, allowing derived classes to override its virtual methods to customize behavior. It also inherits from DisposableObject, ensuring proper resource management.

Methods

RaiseMenuClosed(StringEventArgs)

Calls the RaiseClosed() method if instance specified by args is MenuItem. Calls the RaiseClosing(EventArgs, bool) method if instance specified by args is ContextMenu.

RaiseMenuHighlight(StringEventArgs)

Calls the RaiseHighlighted() method of the MenuItem instance specified by args.

RaiseMenuOpened(StringEventArgs)

Calls the RaiseOpened() method of the MenuItem instance specified by args.

SetMainMenu(Window, MainMenu?)

Sets the main menu for the specified window.

Show(ContextMenu, AbstractControl, PointD?, Action?)

Show menu on screen.