Skip to main content
Version: 4.1

MainMenu

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.1.0.0)

Represents the main menu in a Form.

public class MainMenu : Menu

Constructors​

Initializes a new instance of the MainMenu class without any specified menu items.

Initializes a new instance of the MainMenu class with the specified container.

NameTypeDescription
containerIContainerAn IContainer representing the container of the MainMenu.

Initializes a new instance of the MainMenu with a specified set of MenuItem objects.

NameTypeDescription
itemsMenuItem[]An array of MenuItem objects that will be added to the MainMenu.

Properties​

Instance member AutoOverflow​

Boolean: Enables the overflow handling which automatically removes items that don't fit in the MainMenu and adds them to a drop-down button. (Default: True)

Instance member BackColor​

Color: Returns or sets the background color of the main menu bar.

Instance member CausesValidation​

Boolean: Returns or sets whether clicking menu items causes validation to be performed on the active control. (Default: False)

Instance member Enabled​

Boolean: Returns or sets whether the menu is visible. (Default: True)

Instance member Font​

Font: Returns or sets the font of the main menu bar.

Instance member ForeColor​

Color: Returns or sets the text color of the main menu bar.

Instance member RightToLeft​

RightToLeft: Returns or sets whether the text displayed by the control is displayed from right to left.

Instance member Visible​

Boolean: Returns or sets whether the menu is visible. (Default: True)

Methods​

Instance member CloneMenu()​

Creates a new MainMenu that is a duplicate of the current MainMenu.

Returns: MainMenu. A MainMenu that represents the cloned menu.

Protected member Dispose(disposing)​

Disposes of the resources, other than memory, used by the MainMenu.

ParameterTypeDescription
disposingBooleantrue when this method is called by the application rather than a finalizer.

Instance member GetForm()​

Returns the Form that contains this menu.

Returns: Form. A Form that is the container for this menu. Returns null if the MainMenu is not currently hosted on a form.

Instance member Hide()​

Hides the main menu.

Protected member OnBackColorChanged(e)​

Fires the BackColorChanged event.

ParameterTypeDescription
eEventArgsA EventArgs that contains the event data.

Protected member OnEnabledChanged(e)​

Fires the EnabledChanged event.

ParameterTypeDescription
eEventArgsAn EventArgs that contains the event data.

Protected member OnFontChanged(e)​

Fires the FontChanged event.

ParameterTypeDescription
eEventArgsA EventArgs that contains the event data.

Protected member OnForeColorChanged(e)​

Fires the ForeColorChanged event.

ParameterTypeDescription
eEventArgsA EventArgs that contains the event data.

Protected member OnMenuItemAdded(e)​

ParameterTypeDescription
eMenuItemEventArgs

Protected member OnVisibleChanged(e)​

Fires the VisibleChanged event.

ParameterTypeDescription
eEventArgsA EventArgs that contains the event data.

Protected member OnWebRender(config)​

Renders the client component.

ParameterTypeDescription
configObjectDynamic configuration object.

Instance member Show()​

Shows the main menu.

Instance member Update()​

Updates the component on the client. Overridden to update the owner form.

Events​

Instance member BackColorChanged​

EventHandler Fired when the BackColor property value changes.

Instance member CausesValidationChanged​

EventHandler Fired when the value of the CausesValidation property changes.

Instance member EnabledChanged​

EventHandler Fired when the Enabled property value has changed.

Instance member FontChanged​

EventHandler Fired when the Font property value changes.

Instance member ForeColorChanged​

EventHandler Fired when the ForeColor property value changes.

Instance member VisibleChanged​

EventHandler Fired when the Visible property value changes.

Implements​

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IBindableComponentBindable components implement this interface.
IWisejComponentAll wisej components implement this interface.
IWisejSerializableAllows an object to serialize itself.