BarManager.RestoreLayoutFromRegistry(String) Method
SECURITY NOTE
Deserializing layout settings from untrusted resources may create security issues. Review the following help topic for additional information: Safe Deserialization.
Restores the bars’ layout from the specified system registry path.
Namespace: DevExpress.XtraBars
Assembly: DevExpress.XtraBars.v24.2.dll
NuGet Package: DevExpress.Win.Navigation
#Declaration
#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.
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);