SalPopupMenu
Namespace: PPJ.Runtime.Windows
Assembly: PPJ.Web.50 (5.0.0.0)
A SAL popup-menu branch with dynamic enabled-state evaluation.
- C#
- VB.NET
public class SalPopupMenu : MenuItem, ISalMenu
Public Class SalPopupMenu
Inherits MenuItem
Implements ISalMenu
Example:
var menu = new SalPopupMenu { Text = "File" };
menu.MenuItems.Add(new SalMenuItem { Text = "Open" });
Constructors
SalPopupMenu()
Invokes OnInitializeMenu to populate the new popup branch.
Properties
IsParent
Boolean: Always identifies this item as a parent menu, even when empty.
Owner
Control: Gets the control identified as this menu's SAL owner.
StatusText
String: Gets or sets the status-bar text used when this branch is selected or opened. (Default: "")
Null becomes empty. The first assignment attaches a selection handler.
Methods
CloneMenu()
Clones the inherited popup and copies enabled-state callbacks.
Returns: MenuItem. The cloned SalPopupMenu.
Dispose(disposing)
Clears SAL callback references before disposing the inherited menu item.
| Parameter | Type | Description |
|---|---|---|
| disposing | Boolean | Whether managed resources are being disposed. |
MergeMenu()
Creates and registers a merged menu without running its constructor or initialization hook.
Returns: MenuItem. The merged menu with the EnabledWhen subscriptions copied.
OnInitializeMenu()
Provides the initialization hook overridden by generated named-menu classes.
The base implementation does nothing. Called from construction.
OnPopup(e)
Refreshes child menu states and updates the status bar before raising the inherited event.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The popup event data. |
Open()
Requests that the browser open the popup.
Events
EnabledWhen
SalMenuEnabledWhenHandler Evaluates whether the menu should be enabled when its SAL state is refreshed.
Implements
| Name | Description |
|---|---|
| ISalMenu | Exposes menu refresh, status text, and the owning control for SAL menus. |