Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Collapse]Navigation Controls
   [Collapse]Navigation Bar
     Views
    [Expand]Appearance
     Save and Restore Layout
    [Expand]Examples
    [Expand]Member Tables
   [Expand]Accordion Control
    Navigation Frame and Tab Pane
    Navigation Pane
    Tile Bar
   [Expand]TileNav Pane
    WindowsUI Button Panel
   [Expand]Office Navigation Bar
   [Expand]Tile Control
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Save and Restore Layout

You can save the NavBar control's layout into a number of storage medias and restore it later. This allows you to:

  • provide layout persistence between application runs;
  • automatically switch between the predefined layouts;
  • allow end-users to load different layouts according to their needs;
  • share layouts between different controls in one or different applications, etc.

Refer to this article to learn how to save and restore the control's layout in code. At design-time, you can utilize the "Layout" tab of the Navigation Bar Designer.

Note

To allow a layout to be correctly saved and restored, ensure that all nav bar groups and items created at runtime have their names (the Name property) specified.

Expanded API

Member Description
NavBarControl.SaveToRegistry Saves the control's layout to the specified system registry path.
NavBarControl.SaveToStream Saves the control's layout to a stream.
NavBarControl.SaveToXml Saves a control's layout to a specified XML file.
NavBarControl.RestoreFromRegistry Restores the control layout stored at a specified system registry path.
NavBarControl.RestoreFromStream Loads a control's layout from a stream.
NavBarControl.RestoreFromXml Loads a control's layout from a specified XML file.
NavBarControl.LayoutVersion Gets or sets the version of the control's layout.
NavBarControl.LayoutUpgrade Occurs after a layout whose version doesn't match the current layout version has been loaded from a stream, xml file or system registry.

Expanded Examples

How would you rate this topic?​​​​​​​