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

DataControlBase.RestoreLayoutFromXml(String) Method

Restores a control’s layout from the specified XML file.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v18.2.Core.dll

Declaration

public void RestoreLayoutFromXml(
    string path
)

Parameters

Name Type Description
path String

A String value that specifies the target file name.

Remarks

To save a control’s layout to an XML file, use the DataControlBase.SaveLayoutToXml

Note

Detail grids aren’t automatically serialized when saving the master grid’s layout. To learn more, see Master-Detail Mode Limitations.

To learn more, see Saving and Restoring Layout.

Example

This example shows how to save the grid layout to a memory stream. To do this, click the ‘Save Layout’ button. Once saved, the grid layout can then be restored by clicking the ‘Restore Layout’ button.

using System.Collections.Generic;
using System.Windows;
using System.Windows.Documents;

namespace DXGrid_GridLayout {
    public partial class Window1 : Window {
        public Window1() {
            InitializeComponent();
        }
    }
}
See Also