Skip to main content

SalWindowsMenu

Namespace: PPJ.Runtime.Windows

Assembly: PPJ.Runtime.50 (5.0.0.0)

Provides an MDI window-list menu that evaluates SAL enabled conditions and status text.

public class SalWindowsMenu : MenuItem, ISalMenu

Example:

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

Constructors

Instance member SalWindowsMenu()

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

Properties

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.

Protected member OnPopup(e)

Opens the MDI window menu while suppressing repeated named-menu initialization.

ParameterTypeDescription
eEventArgsThe popup event data.

Throws:

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.