Skip to main content

NavBarSettings.AutoCollapse Property

Gets or sets a value specifying whether only one group can be expanded at a time within the NavBar.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.1.dll

NuGet Package: DevExpress.Web.Mvc5

Declaration

public bool AutoCollapse { get; set; }

Property Value

Type Description
Boolean

true if only one group can be expanded within the NavBar; false if the NavBar can have multiple groups expanded simultaneously.

Remarks

Use the AutoCollapse property to control the ability of the NavBar to automatically collapse any previously expanded group when an end-user expands a new group.

End users are able to expand groups by clicking on the group expand button or group header. If the AutoCollapse property is set to false (the default behavior) end users can expand several groups within the NavBar.

Set the AutoCollapse property to true to apply the auto collapse feature to the NavBar, thus forcing it to have only one group expanded at a time. In this instance, expanding a group collapses any other expanded group within the NavBar. Note that the expanded group cannot be collapsed either by the end-user interface or programmatically. This can only be achieved by expanding another group.

Applying the auto collapse feature to a NavBar that has several currently expanded groups sets the first group from the NavBarSettings.Groups collection to the expanded state and closes any other group.

See Also