Skip to main content

SalPopupMenu

Namespace: PPJ.Runtime.Windows

Assembly: PPJ.Runtime.50 (5.0.0.0)

Provides a submenu that evaluates SAL enabled conditions and updates child menu state when opened.

public class SalPopupMenu : MenuItem, ISalMenu

Example:

var menu = new PPJ.Runtime.Windows.SalPopupMenu { Text = "&File" };
menu.EnabledWhen += () => true;

Constructors

Instance member SalPopupMenu()

Initializes the named menu and connects popup and selection handling unless initialization is suppressed during cloning.

Properties

Instance member IsParent

Boolean: Gets whether this item is treated as a submenu.

Instance member Owner

Control: Gets the control resolved as this menu's owner.

Instance member StatusText

String: Gets or sets the help text displayed in the owning form's status bar when this menu is selected. (Default: "")

Methods

Instance member CloneMenu()

Clones the menu and copies its enabled-condition handlers without repeating named-menu initialization.

Returns: MenuItem. The cloned menu item.

Protected member Dispose(disposing)

Releases the enabled-condition handler and disposes the menu.

ParameterTypeDescription
disposingBooleanTrue to release managed resources as well as native resources.

Instance member MergeMenu()

Creates the base merged menu and copies the enabled-condition handlers without repeating named-menu initialization.

Returns: MenuItem. The merged menu item.

Protected member OnInitializeMenu()

Initializes the named menu's entries and properties.

Override in generated or application menu classes. The base implementation does nothing.

Instance member Update()

Evaluates EnabledWhen and applies its result to Enabled when a handler is attached.

Events

Instance member EnabledWhen

SalMenuEnabledWhenHandler Evaluates whether the menu is enabled when Update is called.

Implements

NameDescription
ISalMenuProvides the status text, owning context, and recursive update contract shared by SAL menu types.