Skip to main content
A newer version of this page is available. .
Bar

BarManager.RestoreLayoutFromRegistry(String) Method

Restores the bars’ layout from the specified system registry path.

Namespace: DevExpress.XtraBars

Assembly: DevExpress.XtraBars.v18.2.dll

Declaration

public virtual void RestoreLayoutFromRegistry(
    string path
)

Parameters

Name Type Description
path String

A string value which specifies the system registry path. If the specified path doesn’t exist, this method does nothing.

Remarks

Note

When restoring a layout during a form load (for instance, in your Form.Load event handler), you may need to call the BarManager.ForceInitialize method prior to the layout restoration. See this method to learn more.

For more information, see Saving and Restoring a Bars Layout Manually.

Example

The following code demonstrates how to write and read a BarManager’s state to/from the system registry. The full path for the bars layout will be: HKEY_CURRENT_USER\DevExpress\XtraBars\States\MainState.

    string regKey = "DevExpress\\XtraBars\\States\\MainState";
    barManager1.SaveLayoutToRegistry(regKey);

    //...

    barManager1.RestoreLayoutFromRegistry(regKey);
See Also