Back to Devexpress

Layout Options and Customization Events

windowsforms-114206-controls-and-libraries-ribbon-bars-and-menu-bars-runtime-customization-and-layout-management-layout-options-and-customization-events.md

latest2.1 KB
Original Source

Layout Options and Customization Events

  • Oct 09, 2018

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

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:

OptionDefault ValueDescription
BarManagerOptionsLayout.AllowAddNewItemsTrueGets or sets whether items that exist in the current layout, but not in the layout being loaded, should be retained.
BarManagerOptionsLayout.AllowRemoveOldItemsFalseGets 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.LayoutVersionGets or sets the version of the layout.
BarManager.BeforeLoadLayoutOccurs before a layout is restored from storage (a stream, xml file or the system registry).
BarManager.LayoutUpgradeOccurs 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).

See Also

Upgrading Layout