Layout Options and Customization Events

  • 2 minutes to read

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:

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).
See Also