MainMenu

Wisej.Web.MainMenu

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.0.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.

Name
Type
Description

container

An IContainer representing the container of the MainMenu.

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

Name
Type
Description

items

An array of MenuItem objects that will be added to the MainMenu.

Properties

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)

BackColor

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

CausesValidation

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

Enabled

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

Font

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

ForeColor

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

RightToLeft

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

Visible

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

Methods

CloneMenu()

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

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

Dispose(disposing)

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

Parameter
Type
Description

disposing

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

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.

Hide()

Hides the main menu.

OnBackColorChanged(e)

Fires the BackColorChanged event.

Parameter
Type
Description

e

A EventArgs that contains the event data.

OnEnabledChanged(e)

Fires the EnabledChanged event.

Parameter
Type
Description

e

An EventArgs that contains the event data.

OnFontChanged(e)

Fires the FontChanged event.

Parameter
Type
Description

e

A EventArgs that contains the event data.

OnForeColorChanged(e)

Fires the ForeColorChanged event.

Parameter
Type
Description

e

A EventArgs that contains the event data.

OnMenuItemAdded(e)

Parameter
Type
Description

OnVisibleChanged(e)

Fires the VisibleChanged event.

Parameter
Type
Description

e

A EventArgs that contains the event data.

OnWebRender(config)

Renders the client component.

Parameter
Type
Description

config

Dynamic configuration object.

Show()

Shows the main menu.

Update()

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

Events

BackColorChanged

EventHandler Fired when the BackColor property value changes.

CausesValidationChanged

EventHandler Fired when the value of the CausesValidation property changes.

EnabledChanged

EventHandler Fired when the Enabled property value has changed.

FontChanged

EventHandler Fired when the Font property value changes.

ForeColorChanged

EventHandler Fired when the ForeColor property value changes.

VisibleChanged

EventHandler Fired when the Visible property value changes.

Implements

Name
Description

Provides access to the UserData and Tag properties associated to the component implementing this interface.

Bindable components implement this interface.

All wisej components implement this interface.

Allows an object to serialize itself.

Last updated

Was this helpful?