Skip to main content
A newer version of this page is available. .

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

NuGet Packages: DevExpress.WindowsDesktop.Wpf.NavBar, DevExpress.Wpf.Navigation

Declaration

public bool IsExpanded { get; set; }

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.

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

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the IsExpanded property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also