Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BaseAppearanceCollection.RestoreLayoutFromXml(String) Method

SECURITY NOTE

Deserializing layout settings from untrusted resources may create security issues. Review the following help topic for additional information: Safe Deserialization.

Loads the appearance settings stored in the specified XML file.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v24.2.dll

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

#Declaration

public virtual void RestoreLayoutFromXml(
    string xmlFile
)

#Parameters

Name Type Description
xmlFile String

A string value specifying the path to the XML file which contains the appearance settings to be loaded. If the specified file doesn’t exist, an exception is raised.

#Remarks

Use the RestoreLayoutFromXml method to load the appearance settings previously saved to an XML file via the BaseAppearanceCollection.SaveLayoutToXml 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);
See Also