Skip to main content
Bar

BarOptions.DisableClose Property

Gets or sets whether the bar can be closed/hidden by the end-user.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool DisableClose { get; set; }

Property Value

Type Default Description
Boolean false

true if the bar can be hidden; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to DisableClose
Bar
.OptionsBar .DisableClose

Remarks

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