LayoutControl.RestoreLayoutFromXml(String) Method

Restores the layout from the specified XML file.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v20.1.dll

Declaration

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

Parameters

Name Type Description
xmlFile String

A String value which specifies the path to the XML file that contains the layout to be loaded. If the specified file doesn't exist, an exception is raised.

Remarks

Use the RestoreLayoutFromXml method to load a layout which has been saved to a file in the XML format using the LayoutControl.SaveLayoutToXml method.

See Save and Restore Layout to learn more.

Examples

The code below demonstrates how the layout can be saved to and then restored from an XML file.

string f = "c:\\Layout.xml";
// Save the layout to an XML file.
layoutControl1.SaveLayoutToXml(f);
// ...
// Restore a previously saved layout.
layoutControl1.RestoreLayoutFromXml(f);

Implements

DevExpress.XtraLayout.ILayoutControl.RestoreLayoutFromXml(String)
DevExpress.Utils.Serializing.ISupportXtraSerializer.RestoreLayoutFromXml(String)
See Also