Skip to main content

How to: Save the layout of bars to a file

Tip

You can utilize the Persistence Behavior or Workspace Manager component to save and restore layouts for all supported DevExpress controls at once.

The following code can be used to read and write a BarManager’s state from/to an XML file.

string xmlFile = "c:\\XtraBars\\States\\MainState.xml";
barManager1.SaveLayoutToXml(xmlFile);

//...

barManager1.RestoreLayoutFromXml(xmlFile);