Represents a menu bar component.
The Wisej.NET MenuBar control provides a menu structure for containers. It consists of MenuItem objects representing individual menu commands or submenus. Each MenuItem can trigger an application command or serve as a parent for submenu items.
For multilingual support, use the RightToLeft property to display menu text appropriately for languages like Arabic.
The MenuBar control can be added to any Wisej.NET container, including Forms, Pages, and FlowLayoutPanels.
The AutoOverflow property automatically displays an overflow icon when menu items exceed the container width.
Class name
"wisej.web.MenuBar", "wiseej.web.menu.MenuBar"
Theme appearance
"menubar", see Themes
Child components
"item" is the menu item, "overflow" is the overflow icon, when applicable. "separator" is the separator appearance
Source code
Represents an individual item that is displayed within a MainMenu or ContextMenu.
The Wisej.NET MenuItem must be added to a MainMenu, MenuBar, or ContextMenu for display. Create submenus by adding MenuItem objects to a parent MenuItem's MenuItems property.
Configure appearance and functionality through properties:
Checked: Displays a check mark (useful for mutually exclusive options like text color selection)
Shortcut: Defines keyboard selection combination
In MDI applications, use MergeMenu to combine MDI parent and child form menus. Since a MenuItem cannot exist in multiple locations simultaneously (like MainMenu and ContextMenu), use CloneMenu to create copies.
Events enable dynamic control:
Popup: Perform pre-display tasks (show/hide items based on application state)
Select: Execute actions when users hover (e.g., display detailed help)
Represents an individual link item that is displayed within a MainMenu or ContextMenu.
The Wisej.NET LinkMenuItem navigates to the location specified in its HRef property when clicked.
Add the LinkMenuItem to a MainMenu or ContextMenu for display.
Configure appearance and functionality through properties:
Checked
Class name
"wisej.web.menu.MenuItem"
Theme appearance
"item", see Themes
Child components
"icon" is the item's icon, if applicable
Source code
Shortcut: Defines keyboard selection combination
In MDI applications, use MergeMenu to combine MDI parent and child form menus. Since a LinkMenuItem cannot exist in multiple locations simultaneously (like MainMenu and ContextMenu), use CloneMenu to create copies.
Events enable dynamic control:
Popup: Perform pre-display tasks (show/hide items based on application state)
Select: Execute actions when users hover (e.g., display detailed help)
Class name
"wisej.web.menu.MenuItem"
Theme appearance
"item", see
Child components
"icon" is the item's icon, if applicable
Source code
Represents a context menu associated to a Control.
The Wisej.NET ContextMenu provides right-click shortcut menus for controls or form areas. These menus can combine relevant items from a form's MainMenu or introduce new context-specific commands. For example, a TextBox control's context menu might offer font changes, text search, and clipboard operations.
Controls and forms expose a ContextMenu property for binding the menu. Multiple controls can share one ContextMenu. Use the SourceControl property to identify which control triggered the menu for control-specific actions or menu modifications.
Handle the Popup event to modify menu items (set check marks, disable items) before display.
The ContextMenu can be assigned to any control supporting the ContextMenu property.
One ContextMenu instance serves both Button and ComboBox controls.
Class name
"wisej.web.menu.ContextMenu"
Theme appearance
"item", see Themes
Child components
"icon" is the item's icon, if applicable. "shortcut" is the item's shortcut. "arrow" is the > arrow icon
Source code
Represents the menu structure of a form.
The Wisej.NET MainMenu control contains a form's menu structure. It consists of MenuItem objects representing individual menu commands or submenus. Bind the MainMenu to a form by assigning it to the form's Menu property.
For multilingual support, use the RightToLeft property to display menu text appropriately for languages like Arabic.
Create different MainMenu objects for varied menu structures. Use CloneMenu to create reusable copies that can be modified for new menu structures.
The AutoOverflow property automatically displays an overflow icon when menu items exceed available space.
LinkMenuItem objects provide URL-opening menu items.
Shortcut keys enable quick access to frequent menu items and keyboard navigation for users without pointer devices.
Add menu items in the designer by:
Drag MainMenu from Toolbox to Form
Expand MenuItems property to add members
For programmatic menu item addition:

Class name
"wisej.web.menu.MainMenu"
Theme appearance
"mainmenu", inherits from "menubar", see Themes
Source code
public void CreateMenu()
{
// Create an empty MainMenu.
MainMenu mainMenu1 = new MainMenu();
MenuItem menuItem1 = new MenuItem();
MenuItem menuItem2 = new MenuItem();
menuItem1.Text = "File";
menuItem2.Text = "Edit";
// Add two MenuItem objects to the MainMenu.
mainMenu1.MenuItems.Add(menuItem1);
mainMenu1.MenuItems.Add(menuItem2);
// Bind the MainMenu to Form1.
this.Menu = mainMenu1;
}



