windowsforms-devexpress-dot-xtragauges-dot-win-dot-gaugecontrolbase-dot-savelayouttoregistry-x28-system-dot-string-x29.md
Using file paths sourced from untrusted input may expose unauthorized files or allow unintended file access. Always validate and normalize all external paths to prevent path manipulation.
Saves the layout of gauges and their elements to a system registry path.
Namespace : DevExpress.XtraGauges.Win
Assembly : DevExpress.XtraGauges.v25.2.Win.dll
NuGet Package : DevExpress.Win.Gauges
public virtual void SaveLayoutToRegistry(
string path
)
Public Overridable Sub SaveLayoutToRegistry(
path As String
)
| Name | Type | Description |
|---|---|---|
| path | String |
A string value specifying the system registry path to which the layout is saved.
|
Use the SaveLayoutToRegistry method to save the layout of gauges and their elements to the system registry. You can then restore these settings using the GaugeControlBase.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 layout at another root key, for instance. An example is the “HKEY_LOCAL_MACHINE\Software\MyCompany\MyProject" registry path.
Tip
You can utilize the Persistence Behavior or Workspace Manager component to save and restore layouts for all supported DevExpress controls at once.
See Also
RestoreLayoutFromRegistry(String)