[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [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
  [Collapse]Ribbon, Bars and Menu
     MDI Merging
    [Expand]Bar Manager Designer
    [Collapse]Runtime Customization and Layout Management
      Runtime Customization
      How To: Organize Bar Items into Categories
      Saving and Restoring a Bars Layout Automatically
      Saving and Restoring a Bars Layout Manually
      Layout Options and Customization Events
      Specifics of Bars Layout Calculation
    [Expand]Appearance and Hotkeys
   [Expand]Popup Menus
    Radial Menu
   [Expand]Common Features
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst 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]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Layout Options and Customization Events

This document provides information on the members that control how the layout of bars is saved to and restored from data stores.

Expanded Layout Options

The BarManager provides methods to save the layout to and then restore it from a data store (an XML file, a stream or the system registry). All these methods start with either SaveLayoutTo... or RestoreLayoutFrom.... For instance, the BarManager.SaveLayoutToXml and BarManager.RestoreLayoutFromXml methods can be used to save/restore a layout using an XML file.

The following members are connected with the saving and loading a layout:

Option Default Value Description
BarManagerOptionsLayout.AllowAddNewItems True Gets or sets whether items that exist in the current layout, but not in the layout being loaded, should be retained.
BarManagerOptionsLayout.AllowRemoveOldItems False Gets or sets whether items that exist in the layout being loaded, but not in the current layout, should be added to the current layout.
OptionsLayoutBase.LayoutVersion Gets or sets the version of the layout.
BarManager.BeforeLoadLayout Occurs before a layout is restored from storage (a stream, xml file or the system registry).
BarManager.LayoutUpgrade Occurs after a layout whose version doesn't match the current layout's version has been loaded from storage(a stream, xml file or system registry).

Expanded See Also

Is this topic helpful?​​​​​​​