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.
- C#
- VB.NET
public class SalPopupMenu : MenuItem, ISalMenu
Public Class SalPopupMenu
Inherits MenuItem
Implements ISalMenu
Example:
var menu = new PPJ.Runtime.Windows.SalPopupMenu { Text = "&File" };
menu.EnabledWhen += () => true;
Constructors
SalPopupMenu()
Initializes the named menu and connects popup and selection handling unless initialization is suppressed during cloning.
Properties
IsParent
Boolean: Gets whether this item is treated as a submenu.
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.
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. |