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.
- C#
- VB.NET
public class SalWindowsMenu : MenuItem, ISalMenu
Public Class SalWindowsMenu
Inherits MenuItem
Implements ISalMenu
Example:
var menu = new PPJ.Runtime.Windows.SalWindowsMenu { Text = "&Window" };
menu.EnabledWhen += () => true;
Constructors
SalWindowsMenu()
Initializes the named menu and connects popup and selection handling unless initialization is suppressed during cloning.
Properties
Owner
Control: Gets the control resolved as this menu's owner.
StatusText
String: Gets or sets the help text displayed in the owning form's status bar when this menu is selected. (Default: "")
Methods
CloneMenu()
Clones the menu and copies its enabled-condition handlers without repeating named-menu initialization.
Returns: MenuItem. The cloned menu item.
Dispose(disposing)
Releases the enabled-condition handler and disposes the menu.
| Parameter | Type | Description |
|---|---|---|
| disposing | Boolean | True to release managed resources as well as native resources. |
MergeMenu()
Creates the base merged menu and copies the enabled-condition handlers without repeating named-menu initialization.
Returns: MenuItem. The merged menu item.
OnInitializeMenu()
Initializes the named menu's entries and properties.
Override in generated or application menu classes. The base implementation does nothing.
OnPopup(e)
Opens the MDI window menu while suppressing repeated named-menu initialization.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The popup event data. |
Throws:
- InvalidOperationException The menu is not attached to a form's main menu.
Update()
Evaluates EnabledWhen and applies its result to Enabled when a handler is attached.
Events
EnabledWhen
SalMenuEnabledWhenHandler Evaluates whether the menu is enabled when Update is called.
Implements
| Name | Description |
|---|---|
| ISalMenu | Provides the status text, owning context, and recursive update contract shared by SAL menu types. |