BaseAppearanceCollection.SaveLayoutToRegistry(String) Method
Saves the appearance settings to a system registry path.
Namespace: DevExpress.Utils
Assembly: DevExpress.Utils.v24.1.dll
NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
path | String | A string value specifying the system registry path to which the appearance settings are saved. |
Remarks
Use the SaveLayoutToRegistry method to save the activated appearance settings to the system registry. The appearance settings are activated if their corresponding options are enabled. You can then restore these settings using the BaseAppearanceCollection.RestoreLayoutFromRegistry method.
You can define whole and partial registry keys as the parameter. For instance, specifying “Software\MyCompany\MyProject" as a partial key will result in saving settings to the “HKEY_CURRENT_USER\Software\MyCompany\MyProject" path. You can also specify the entire path if you need to store the appearance settings to another root key, for instance “HKEY_LOCAL_MACHINE\Software\MyCompany\MyProject".
Example
The following code can be used to write and read the appearance settings applied to the XtraGrid’s elements to/from the system registry. The full path used is: HKEY_CURRENT_USER\DevExpress\Utils\Layouts\Appearance.
string regKey = "DevExpress\\Utils\\Layouts\\Appearance";
gridControl1.MainView.Appearance.SaveLayoutToRegistry(regKey);
//...
gridControl1.MainView.Appearance.RestoreLayoutFromRegistry(regKey);