windowsforms-devexpress-dot-xtrabars-dot-baroptions-22de4b63.md
Gets or sets whether the bar can be closed/hidden by the end-user.
Namespace : DevExpress.XtraBars
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool DisableClose { get; set; }
<XtraSerializableProperty>
<DefaultValue(False)>
Public Overridable Property DisableClose As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true if the bar can be hidden; otherwise, false.
|
You can access this nested property as listed below:
| Object Type | Path to DisableClose |
|---|---|
| Bar |
.OptionsBar .DisableClose
|
By default, the end-user can close (hide) a bar via the Customization Window, and for floating bars, by pressing the ‘x’ button displayed in the bar’s top right corner.
Use the DisableClose property to prevent the bar from being closed/hidden at runtime.
If a bar is hidden, it can be accessed via the Customization Window provided that the bar’s BarOptions.Hidden option is set to false. To specify the bar’s visibility via code, use the Bar.Visible property.
The BarManager.AllowCustomization property defines whether the Customization Window is available.
See Also