NavBarGroup.IsExpanded Property
Gets or sets a value specifying whether the group is expanded. This is a dependency property.
Namespace: DevExpress.Xpf.NavBar
Assembly: DevExpress.Xpf.NavBar.v21.2.dll
NuGet Package: DevExpress.Wpf.NavBar
Declaration
Property Value
Type | Description |
---|---|
Boolean | true if the group is expanded, otherwise false. |
Remarks
Use the IsExpanded property to expand and collapse groups.
Changing a group’s expanded state results in generating the ExplorerBarView.GroupExpandedChanging and ExplorerBarView.GroupExpandedChanged events.
Note
The IsExpanded property is in effect only for the Explorer Bar view.
Example
This example demonstrates how the NavBarControl.Groups collection can be iterated programmatically, and the expanded state of groups can be toggled by using a group’s NavBarGroup.IsExpanded
property.
The result is demonstrated by the following image.
Private Sub button1_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
For i As Integer = 0 To navBarControl1.Groups.Count - 1
Dim currentGroup As NavBarGroup = navBarControl1.Groups(i)
currentGroup.IsExpanded = Not currentGroup.IsExpanded
Next i
End Sub