Skip to main content
Version: 2025

SalMenuItem

Namespace: PPJ.Runtime.Windows

Assembly: PPJ.Web.50 (5.0.0.0)

A SAL command item with action, enabled-state, and checked-state callbacks.

public class SalMenuItem : MenuItem, ISalMenu

Example:

var command = new SalMenuItem { Text = "Refresh" };
command.EnabledWhen += () => true;
command.MenuActions += () => { RefreshData(); return 0; };

Constructors

Instance member SalMenuItem()

Creates an empty SAL command item.

Properties

Instance member ImageName

String: Gets or sets the icon resource name, with browser-source fallback. (Default: "")

A changed nonempty name loads from the design site or calling assembly. If no resource image resolves, the name becomes IconSource. Null becomes empty; empty clears Icon.

Instance member ImageNormal

Deprecated memberDeprecated: Image: Gets or sets the obsolete normal-image compatibility value. (Default: null)

Stored independently; this property does not assign the rendered Icon.

Instance member ImageSelected

Deprecated memberDeprecated: Image: Gets or sets the obsolete selected-image compatibility value. (Default: null)

Stored independently; this property does not assign the rendered Icon.

Int32: Gets the inherited numeric menu identifier.

Instance member Owner

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

Instance member StatusText

String: Gets or sets the status-bar hint shown when the menu is selected. (Default: "")

Null becomes empty. The first assignment attaches the selection handler.

Methods

Instance member CloneMenu()

Creates the inherited clone and copies SAL callback subscriptions.

Returns: MenuItem. The cloned SalMenuItem.

Protected member Dispose(disposing)

Clears SAL callback references before disposing the inherited menu item.

ParameterTypeDescription
disposingBooleanWhether managed resources are being disposed.

Instance member MergeMenu()

Creates the inherited merged item and copies SAL callback subscriptions.

Returns: MenuItem. The merged SalMenuItem.

Protected member OnClick(e)

Invokes SAL command callbacks and then raises the inherited click event.

ParameterTypeDescription
eEventArgsThe click event data.

When a menu context exists, enters that context and refreshes enabled state before running the action. Without a context, invokes the action directly.

Protected member OnWebEvent(e)

Processes browser execution events within the menu's SAL context.

ParameterTypeDescription
eWisejEventArgsThe browser event; execute is routed to the specialized execution handler.

Protected member OnWebRender(config)

Replaces the standard menu-item client class with the SAL client class.

ParameterTypeDescription
configObjectThe mutable browser configuration.

Events

Instance member CheckedWhen

SalMenuCheckedWhenHandler Evaluates whether the item should be checked when its SAL state is refreshed.

Instance member EnabledWhen

SalMenuEnabledWhenHandler Evaluates whether the menu should be enabled when its SAL state is refreshed.

SalMenuActionsHandler Executes the SAL command when the item is clicked.

Implements

NameDescription
ISalMenuExposes menu refresh, status text, and the owning control for SAL menus.