Back to Devexpress

BaseAppearanceCollection.RestoreLayoutFromXml(String) Method

windowsforms-devexpress-dot-utils-dot-baseappearancecollection-dot-restorelayoutfromxml-x28-system-dot-string-x29.md

latest3.0 KB
Original Source

BaseAppearanceCollection.RestoreLayoutFromXml(String) Method

SECURITY-RELATED CONSIDERATIONS

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.v25.2.dll

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

Declaration

csharp
public virtual void RestoreLayoutFromXml(
    string xmlFile
)
vb
Public Overridable Sub RestoreLayoutFromXml(
    xmlFile As String
)

Parameters

NameTypeDescription
xmlFileString

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.

csharp
string fileName = "C:\\appearanceLayout.xml";
gridControl1.MainView.Appearance.SaveLayoutToXml(fileName);
// ...
gridControl1.MainView.Appearance.RestoreLayoutFromXml(fileName);
vb
Dim fileName As String = "C:\appearanceLayout.xml"
GridControl1.MainView.Appearance.SaveLayoutToXml(fileName)
' ...
GridControl1.MainView.Appearance.RestoreLayoutFromXml(fileName)

See Also

SaveLayoutToXml(String)

RestoreLayoutFromRegistry(String)

RestoreLayoutFromStream(Stream)

Save and Restore Layouts of DevExpress controls

BaseAppearanceCollection Class

BaseAppearanceCollection Members

DevExpress.Utils Namespace