wpf-devexpress-dot-xpf-dot-docking-dot-docklayoutmanager-dot-restorelayoutfromxml-x28-system-dot-string-x29.md
Deserializing layout settings from untrusted resources may create security issues. Review the following help topic for additional information: Safe Deserialization.
Restores the layout of dock panes from an XML file.
Namespace : DevExpress.Xpf.Docking
Assembly : DevExpress.Xpf.Docking.v25.2.dll
NuGet Package : DevExpress.Wpf.Docking
public void RestoreLayoutFromXml(
string path
)
Public Sub RestoreLayoutFromXml(
path As String
)
| Name | Type | Description |
|---|---|---|
| path | String |
An XML file that contains the layout of dock panes.
|
See Saving and Restoring the Layout of Dock Panels and Controls to learn more.
The following code snippets (auto-collected from DevExpress Examples) contain references to the RestoreLayoutFromXml(String) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
wpf-dock-layout-manager-save-and-restore-the-dock-layout-managers-layout/CS/MainWindow.xaml.cs#L17
private void OnRestoreButtonClick(object sender, System.Windows.RoutedEventArgs e) {
manager.RestoreLayoutFromXml(LayoutFileName);
}
(dockLayoutManager.DataContext as MainViewModel).RestoreDocsInfo(docPath);
dockLayoutManager.RestoreLayoutFromXml(path);
}
wpf-dock-layout-manager-save-and-restore-the-dock-layout-managers-layout/VB/MainWindow.xaml.vb#L21
Private Sub OnRestoreButtonClick(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs)
Me.manager.RestoreLayoutFromXml(LayoutFileName)
End Sub
TryCast(Me.dockLayoutManager.DataContext, MainViewModel).RestoreDocsInfo(docPath)
Me.dockLayoutManager.RestoreLayoutFromXml(path)
End If
See Also
RestoreLayoutFromStream(Stream)
RestoreLayoutFromXml(String)