Saving and Restoring Gauge Layout and Style Settings

  • 2 minutes to read

Gauges, as well as many other DevExpress controls, support save/restore the layout feature. This feature gives you the ability to store different layout versions of your gauges and cycle through them when needed.

Using the GaugeControlBase class API, you can store gauge layouts in XML files, stream or registry.

All these methods allow you to save and restore overall gauge layout settings: currently existing Visual Elements, their behavior and style settings. If you do not want your gauge layout to be affected, but rather wish to save and restore various style presets, use related Save(Restore)Style... methods instead. Same as with saving layouts, these methods allow you to save style settings to a local storage or stream, but do not allow you to save them to a registry.

Gauge paint styles can also be managed by the StyleController component.

Workspace Manager

Additionally to the methods mentioned above, you can utilize the Workspace Manager component. This component provides a centralized way to save layouts of all supported DevExpress controls in one global layout called workspace. This component allows you to create multiple predefined application workspaces that your users will be able to choose from, as well as save and restore their own custom workspaces.