Skip to main content
Version: 4.2

MenuBar

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Represents a menu bar component.

public class MenuBar : Control

Derives from or implements Control, IWisejControl.

  • ImeMode This member is not meaningful for this control.
  • Padding This property is not relevant for this class.
  • BorderStyle Gets or sets the border style of the MenuBar control.

Constructors​

Initializes a new instance of the MenuBar class.

Properties​

Instance member AutoOverflow​

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

Value: true if the menu bar should automatically handle overflow items; otherwise, false. The default is true.

Instance member BorderStyle​

BorderStyle: Gets or sets the border style of the MenuBar control. (Default: None)

Value: One of the BorderStyle values. The default is BorderStyle.None.

Instance member CausesValidation​

Boolean: Gets or sets whether the control causes validation to be performed on controls that require to be validated when this control receives focus. (Default: False)

Value: true if the control causes validation to be performed on controls losing the focus; otherwise, false. The default is false.

Protected member DefaultSize​

Size: Returns the default size of the control.

Value: The default Size of the control.

Instance member Dock​

DockStyle: Gets or sets which control borders are docked to its parent control and determines how a control is resized with its parent. (Default: None)

Value: One of the DockStyle values. The default is None.

MenuItemCollection: Returns the collection of MenuItem objects associated with the menu.

Value: A MenuItemCollection that represents the list of MenuItem objects stored in the menu.

Methods​

Protected member Dispose(disposing)​

Disposes of the resources (other than memory) used by the MenuBar.

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

Protected member OnAddReferences(items)​

Returns a collection of referenced components or collection of components.

ParameterTypeDescription
itemsIListThe items passed to the operation.

Protected member OnBindingContextChanged(e)​

Raises the BindingContextChanged event.

ParameterTypeDescription
eEventArgsAn EventArgs that contains the event data.

Protected member OnEnabledChanged(e)​

Raises the EnabledChanged event.

ParameterTypeDescription
eEventArgsAn EventArgs that contains the event data.

Protected member OnMenuItemAdded(e)​

Raises the MenuItemAdded event.

ParameterTypeDescription
eMenuItemEventArgsA MenuItemEventArgs that contains the event data.

Protected member OnMenuItemClicked(e)​

Fired the MenuItemClicked event.

ParameterTypeDescription
eMenuItemEventArgsA MenuItemEventArgs that contains the event data.

Protected member OnMenuItemRemoved(e)​

Raises the MenuItemRemoved event.

ParameterTypeDescription
eMenuItemEventArgsA MenuItemEventArgs that contains the event data.

Protected member OnParentChanged(e)​

Raises the ParentChanged event.

ParameterTypeDescription
eEventArgsAn EventArgs that contains the event data.

Protected member OnWebRender(config)​

Renders the client component.

ParameterTypeDescription
configObjectDynamic configuration object.

Protected member SetBoundsCore(x, y, width, height, specified)​

Sets the specified bounds of the MenuBar control.

ParameterTypeDescription
xInt32The new Left property value of the control.
yInt32The new Top property value of the control.
widthInt32The new Width property value of the control.
heightInt32Not used.
specifiedBoundsSpecifiedA combination of the BoundsSpecified values.

Events​

MenuItemEventHandler Occurs when a new menu item is added to the MenuItemCollection.

MenuItemEventHandler Occurs when a menu item is clicked.

MenuItemEventHandler Occurs when a menu item is removed from the MenuItemCollection.

Implements​

NameDescription
IUserDataProvides access to the UserData and Tag properties associated to the component implementing this interface.
IBindableComponentBindable components implement this interface.
IDropTargetControls that support drag & drop operations implement this interface.
IWisejComponentAll wisej components implement this interface.
IWisejControlAll wisej controls derived from the Control class must implement this interface.
IWisejSerializableAllows an object to serialize itself.