windowsforms-devexpress-dot-xtrabars-dot-barmanager-6c64f11d.md
Gets or sets the bar that is used as the form’s main menu.
Namespace : DevExpress.XtraBars
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DefaultValue(null)]
[DXCategory("Behavior")]
public virtual Bar MainMenu { get; set; }
<DXCategory("Behavior")>
<DefaultValue(Nothing)>
Public Overridable Property MainMenu As Bar
| Type | Default | Description |
|---|---|---|
| Bar | null |
A bar that is the form’s main menu. null ( Nothing in Visual Basic) if there is no main menu on the form.
|
The MainMenu property specifies the bar that is the form’s main menu. There can be only one main menu on the form.
The main menu has the following specificities:
The Bar.CanDockStyle property specifies the form’s edges where a user can dock the main menu. For instance, if you set this property to Top, a user cannot dock the main menu to any other edge or make it float.
To dock a bar to the form’s specific edge in code, use the Bar.DockStyle property.
See Also