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

BaseAppearanceCollection.SaveLayoutToXml(String) Method

Saves the appearance settings to a specific XML file.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v19.2.dll

Declaration

public virtual void SaveLayoutToXml(
    string xmlFile
)

Parameters

Name Type Description
xmlFile String

A string value specifying the path to the file in which the appearance settings should be stored. If an empty string is specified, an exception is raised.

Remarks

Use the SaveLayoutToXml method to save the activated appearance settings to an XML file at runtime. The appearance settings are activated if their corresponding options are enabled. You can then restore the saved settings using the BaseAppearanceCollection.RestoreLayoutFromXml method.

Example

The following example shows how to read and write the appearance settings used to paint the XtraGrid’s elements to/from an XML file.

string fileName = "C:\\appearanceLayout.xml";
gridControl1.MainView.Appearance.SaveLayoutToXml(fileName);
// ...
gridControl1.MainView.Appearance.RestoreLayoutFromXml(fileName);

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SaveLayoutToXml(String) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also