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.v20.2.dll

Declaration

public bool IsExpanded { get; set; }
Public Property IsExpanded As Boolean

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.

Examples

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.

Example-ToggleExpandedState.png

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