LayoutControlBase.ReadFromXML(XmlReader) Method

Restores the layout of child items that have been previously saved via the LayoutControlBase.WriteToXML method.

Namespace: DevExpress.Xpf.LayoutControl

Assembly: DevExpress.Xpf.LayoutControl.v20.1.dll


public virtual void ReadFromXML(
    XmlReader xml
Public Overridable Sub ReadFromXML(
    xml As XmlReader


Name Type Description
xml XmlReader

A System.Xml.XmlReader object from which data is read.


You can save the layout of child items via the LayoutControlBase.WriteToXML method. The ReadFromXML method allows you to load the previously saved layout.


To correctly save and then restore the layout of items, you need to assign names to the items. If names are not specified, the layout will be correctly restored, provided that the LayoutControl's/LayoutGroup's item collection (the order and number of items) wasn't modified after the layout was saved.

To load a layout, we recommend using the Loaded event of a UserControl or a window.

See Also