Saves the bars’ layout to an XML file.
public virtual void SaveLayoutToXml( string xmlFile )
Public Overridable Sub SaveLayoutToXml( xmlFile As String )
A string value which specifies the path to the file where the bars’ layout should be stored. If an empty string is specified, an exception is raised.
After the bars’ layout has been saved using the SaveLayoutToXml method it can then be restored using the BarManager.RestoreLayoutFromXml method.
Bar items within the Bar Manager and within the stored layout are identified by unique identifiers specified by the BarItem.Id property. To correctly save the layout, ensure that this property is set to a unique value for each bar item. For items created at design time, the BarItem.Id properties are initialized automatically. For items created in code, you need to manually initialize their BarItem.Id properties.
For more information, see Saving and Restoring a Bars Layout Manually.
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);