MenuItem

Wisej.Web.MenuItem

Namespace: Wisej.Web

Assembly: Wisej.Framework (2.5.0.0)

Represents an individual item that is displayed within a MainMenu or ContextMenu.

public class MenuItem : Menu

Constructors

Initializes a MenuItem with a blank caption.

Initializes a new instance of the MenuItem class with a specified caption for the menu item.

Name
Type
Description

text

The caption for the menu item.

Initializes a new instance of the class with a specified caption and event handler for the Click event of the menu item.

Name
Type
Description

text

The caption for the menu item.

onClick

The EventHandlerarrow-up-right that handles the Click event for this menu item.

Initializes a new instance of the class with a specified caption, event handler, and associated shortcut key for the menu item.

Name
Type
Description

text

The caption for the menu item.

onClick

The EventHandlerarrow-up-right that handles the Click event for this menu item.

shortcut

One of the Shortcut values.

Initializes a new instance of the class with a specified caption and an array of submenu items defined for the menu item.

Name
Type
Description

text

The caption for the menu item.

items

An array of MenuItem objects that contains the submenu items for this menu item.

Initializes a new instance of the MenuItem class with a specified caption; defined event-handlers for the Click, Select and Popup events; a shortcut key; a merge type; and order specified for the menu item.

Name
Type
Description

mergeType

One of the MenuMerge values.

mergeOrder

The relative position that this menu item will take in a merged menu.

shortcut

One of the Shortcut values.

text

The caption for the menu item.

onClick

The EventHandlerarrow-up-right that handles the Click event for this menu item.

onPopup

The EventHandlerarrow-up-right that handles the Popup event for this menu item.

onSelect

The EventHandlerarrow-up-right that handles the Select event for this menu item.

items

An array of MenuItem objects that contains the submenu items for this menu item.

Properties

AllowHtml

Booleanarrow-up-right: Returns or sets a value indicating that the control can display html in the Text property.

AutoShowLoader

Booleanarrow-up-right: Returns or sets whether the application blocks the browser with a modal mask when this menu item is clicked and until the server is done processing the execution request.

BackColor

Colorarrow-up-right: Returns or sets the background color of the menu item.

CharacterCasing

CharacterCasing: Returns or sets the case of the text to display to the user.

Checked

Booleanarrow-up-right: Returns or sets whether a check mark appears next to the text of the menu item.

Throws:

Enabled

Booleanarrow-up-right: Returns or sets whether the menu item is enabled.

Font

Fontarrow-up-right: Returns or sets the font of the menu item.

ForeColor

Colorarrow-up-right: Returns or sets the text color of the menu item.

Form

Form: Returns the Form that owns the Menu.

Icon

Imagearrow-up-right: Returns or sets the icon that is displayed by MenuItem.

IconSource

Stringarrow-up-right: Returns or sets the theme name or URL for the icon to display in the MenuItem.

Index

Int32arrow-up-right: Returns or sets a value indicating the position of the menu item in its parent menu.

Throws:

IsParent

Booleanarrow-up-right: Returns a value indicating whether the menu item contains child menu items.

MdiList

Booleanarrow-up-right: Returns or sets whether the menu item will be populated with a list of the Multiple Document Interface (MDI) child windows that are displayed within the associated form.

MergeOrder

Int32arrow-up-right: Returns or sets a value indicating the relative position of the menu item when it is merged with another.

MergeType

MenuMerge: Returns or sets a value indicating the behavior of this menu item when its menu is merged with another.

Parent

Menu: The parent menu that contains this menu item

RadioCheck

Booleanarrow-up-right: Returns or sets whether the MenuItem, if checked, displays a radio-button instead of a check mark.

Shortcut

Shortcut: Returns or sets a value indicating the shortcut key associated with the menu item.

ShowShortcut

Booleanarrow-up-right: Returns or sets whether the shortcut key that is associated with the menu item is displayed next to the menu item caption.

SizeMode

MenuItemSizeMode: Returns or sets how the menu item is resized when in a MenuBar or MainMenu

SourceControl

Control: Returns the Control that owns the ContextMenu.

Text

Stringarrow-up-right: Returns or sets a value indicating the text of the menu item. Use "-" to display the menu separator.

Visible

Booleanarrow-up-right: Returns or sets whether the menu item is visible.

Methods

CloneMenu()

Creates a copy of the current MenuItem.

Returns: MenuItem. A MenuItem that represents the duplicated menu item.

MergeMenu()

Merges this MenuItem with another MenuItem and returns the resulting merged MenuItem.

Returns: MenuItem. A MenuItem that represents the merged menu item.

PerformClick()

Generates a Click event for the MenuItem, simulating a click by a user.

PerformSelect()

Fires the Select event for this menu item.

Update()

Updates the component on the client.

Events

BackColorChanged

EventHandlerarrow-up-right Fired when the BackColor property value changes.

CheckedChanged

EventHandlerarrow-up-right Fired when the Checked property value changes.

Click

EventHandlerarrow-up-right Fired when the menu item is clicked or selected using a shortcut key or access key defined for the menu item.

FontChanged

EventHandlerarrow-up-right Fired when the Font property value changes.

ForeColorChanged

EventHandlerarrow-up-right Fired when the ForeColor property value changes.

EventHandlerarrow-up-right Occurs before a menu item's list of menu items is displayed.

Select

EventHandlerarrow-up-right Fired when the user places the pointer over a menu item.

TextChanged

EventHandlerarrow-up-right Fired when the Text property value changes.

Inherited By

Name
Description

Represents an individual menu item that is displayed within a MainMenu or ContextMenu and always shows a checkbox next to the label.

Represents an individual menu item that is displayed within a MainMenu or ContextMenu rendered using the link element to let the browser process the specified HRef URL.

Implements

Name
Description

All wisej components implement this interface.

Allows an object to serialize itself.

Last updated

Was this helpful?