# MenuBar

URL: https://docs.wisej.com/api/wisej.web/menus/wisej.web.menubar

Version: 4.1
Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.1.0.0)

- Control
- [MenuBar](/api/wisej.web/menus/wisej.web.menubar)
Represents a menu bar component.

- C# - VB.NET

```csharp
public class MenuBar : Control
```

```visual
Public Class MenuBar
    Inherits Control
```

## Constructors

### ![Instance member](/img/api/instance.png) MenuBar()

Initializes a new instance of the [MenuBar](/api/wisej.web/menus/wisej.web.menubar) class.

## Properties

### ![Instance member](/img/api/instance.png) AutoOverflow

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) : Enables the overflow handling which automatically removes items that don't fit in the [MenuBar](/api/wisej.web/menus/wisej.web.menubar) and adds them to a drop-down menu button. (Default: `True` )

### ![Instance member](/img/api/instance.png) BorderStyle

[BorderStyle](/api/wisej.web/enumerations/wisej.web.borderstyle) : Returns or sets the border style of the [MenuBar](/api/wisej.web/menus/wisej.web.menubar) control. (Default: `None` )

### ![Instance member](/img/api/instance.png) CausesValidation

[Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) : Returns or sets whether the control causes validation to be performed on controls that require to be validated when this control receives focus. (Default: `False` )

### ![Protected member](/img/api/protected.png) DefaultSize

[Size](https://docs.microsoft.com/dotnet/api/system.drawing.size) :

### ![Instance member](/img/api/instance.png) Dock

[DockStyle](/api/wisej.web/enumerations/wisej.web.dockstyle) : (Default: `None` )

### ![Instance member](/img/api/instance.png) MenuItems

[MenuItemCollection](/api/wisej.web/menus/wisej.web.menu.menuitemcollection) : Returns the collection of [MenuItem](/api/wisej.web/menus/wisej.web.menuitem) objects associated with the menu.

## Methods

### ![Protected member](/img/api/protected.png) Dispose(disposing)

Disposes of the resources (other than memory) used by the [MenuBar](/api/wisej.web/menus/wisej.web.menubar) .

| Parameter | Type | Description | **disposing** | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean) | true when this method is called by the application rather than a finalizer. 

### ![Protected member](/img/api/protected.png) OnAddReferences(items)

Returns a collection of referenced components or collection of components.

| Parameter | Type | Description | **items** | [IList](https://docs.microsoft.com/dotnet/api/system.collections.ilist) | 

### ![Protected member](/img/api/protected.png) OnBindingContextChanged(e)

Fires the [BindingContextChanged](/api/wisej.web/general/control/#bindingcontextchanged) event.

| Parameter | Type | Description | **e** | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | An [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) that contains the event data. 

### ![Protected member](/img/api/protected.png) OnEnabledChanged(e)

| Parameter | Type | Description | **e** | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | 

### ![Protected member](/img/api/protected.png) OnMenuItemAdded(e)

Fires the [MenuItemAdded](/api/wisej.web/menus/wisej.web.menubar#menuitemadded) event.

| Parameter | Type | Description | **e** | [MenuItemEventArgs](/api/wisej.web/menus/wisej.web.menuitemeventargs) | A [MenuItemEventArgs](/api/wisej.web/menus/wisej.web.menuitemeventargs) that contains the event data. 

### ![Protected member](/img/api/protected.png) OnMenuItemClicked(e)

Fired the [MenuItemClicked](/api/wisej.web/menus/wisej.web.menubar#menuitemclicked) event.

| Parameter | Type | Description | **e** | [MenuItemEventArgs](/api/wisej.web/menus/wisej.web.menuitemeventargs) | A [MenuItemEventArgs](/api/wisej.web/menus/wisej.web.menuitemeventargs) that contains the event data. 

### ![Protected member](/img/api/protected.png) OnMenuItemRemoved(e)

Fires the [MenuItemRemoved](/api/wisej.web/menus/wisej.web.menubar#menuitemremoved) event.

| Parameter | Type | Description | **e** | [MenuItemEventArgs](/api/wisej.web/menus/wisej.web.menuitemeventargs) | A [MenuItemEventArgs](/api/wisej.web/menus/wisej.web.menuitemeventargs) that contains the event data. 

### ![Protected member](/img/api/protected.png) OnParentChanged(e)

| Parameter | Type | Description | **e** | [EventArgs](https://docs.microsoft.com/dotnet/api/system.eventargs) | 

### ![Protected member](/img/api/protected.png) OnWebRender(config)

Renders the client component.

| Parameter | Type | Description | **config** | [Object](https://docs.microsoft.com/dotnet/api/system.object) | Dynamic configuration object. 

### ![Protected member](/img/api/protected.png) SetBoundsCore(x, y, width, height, specified)

Sets the specified bounds of the [MenuBar](/api/wisej.web/menus/wisej.web.menubar) control.

| Parameter | Type | Description | **x** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The new Left property value of the control. | **y** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The new Top property value of the control. | **width** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | The new Width property value of the control. | **height** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32) | Not used. | **specified** | [BoundsSpecified](/api/wisej.web/enumerations/wisej.web.boundsspecified) | A combination of the [BoundsSpecified](/api/wisej.web/enumerations/wisej.web.boundsspecified) values. 

## Events

### ![Instance member](/img/api/instance.png) MenuItemAdded

[MenuItemEventHandler](/api/wisej.web/menus/wisej.web.menuitemeventhandler) Fired when a new menu item is added to the [MenuItemCollection](/api/wisej.web/menus/wisej.web.menu.menuitemcollection) .

### ![Instance member](/img/api/instance.png) MenuItemClicked

[MenuItemEventHandler](/api/wisej.web/menus/wisej.web.menuitemeventhandler) Fired when a menu item is clicked.

### ![Instance member](/img/api/instance.png) MenuItemRemoved

[MenuItemEventHandler](/api/wisej.web/menus/wisej.web.menuitemeventhandler) Fired when a menu item is removed from the [MenuItemCollection](/api/wisej.web/menus/wisej.web.menu.menuitemcollection) .

## Implements

| Name | Description | [IUserData](/api/wisej.web/interfaces/wisej.web.iuserdata) | Provides access to the `UserData` and `Tag` properties associated to the component implementing this interface. | [IBindableComponent](/api/wisej.web/data-binding/wisej.web.ibindablecomponent) | Bindable components implement this interface. | [IDropTarget](/api/wisej.web/interfaces/wisej.web.idroptarget) | Controls that support drag & drop operations implement this interface. | [IWisejComponent](/api/wisej.core/interfaces/wisej.core.iwisejcomponent) | All wisej components implement this interface. | [IWisejControl](/api/wisej.core/interfaces/wisej.core.iwisejcontrol) | All wisej controls derived from theControl class must implement this interface. | [IWisejSerializable](/api/wisej.core/interfaces/wisej.core.iwisejserializable) | Allows an object to serialize itself.
