Back to Devexpress

How to: Change the control's view via code

wpf-6903-controls-and-libraries-navigation-controls-navigation-bar-examples-how-to-change-the-controls-view-via-code.md

latest914 B
Original Source

How to: Change the control's view via code

  • Aug 01, 2019

To change a NavBarControl’s view in code, you should create a new instance of the required view object (SideBarView, NavigationPaneView, or ExplorerBarView) and assign it to the NavBarControl.View property.

csharp
using DevExpress.Xpf.NavBar;

//...
    NavigationPaneView navPaneView = new NavigationPaneView();
    navPaneView.ActiveGroupMinHeight = 200;
    navBarControl1.View = navPaneView;
vb
Imports DevExpress.Xpf.NavBar

'...
    Dim navPaneView As New NavigationPaneView()
    navPaneView.ActiveGroupMinHeight = 200
    navBarControl1.View = navPaneView