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.1.dll


public bool IsExpanded { get; set; }

Property Value

Type Description

true if the group is expanded, otherwise false.


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.


The IsExpanded property is in effect only for the Explorer Bar view.


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.


View Example

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
See Also