Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Collapse]Layout Management
   [Collapse]Dock Windows
    [Expand]Getting Started
    [Expand]Dock Items
    [Expand]Layout Items
    [Expand]Runtime Features
    [Collapse]Miscellaneous
      Saving and Restoring the Layout of Dock Panels and Controls
      Managing Dock Panels in Code
      MVVM Support - Building Dock UI
      WPF and WinForms Interoperation Limitations
    [Expand]Examples
   [Expand]Tile and Layout
   [Expand]Tab Control
   [Expand]Carousel
    Book Control
    Workspace Manager
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Saving and Restoring the Layout of Dock Panels and Controls

The layout of dock panels and the layout of controls within panels/groups can be saved to a data store (an XML file or stream), and then restored from this data store, overriding the changes made since the layout was saved. This document provides more information on this topic.

Expanded Saving and Restoring the Layout of Dock Panels and Controls

The layout of dock panels, layout items and controls can be saved to a data store manually using one of the following methods: DockLayoutManager.SaveLayoutToStream and DockLayoutManager.SaveLayoutToXml. To restore a layout, use one of the corresponding methods: DockLayoutManager.RestoreLayoutFromStream or DockLayoutManager.RestoreLayoutFromXml.

The history of dock operations is not saved when layouts are saved to a data store.

To correctly save and restore the layout of controls, ensure that all items have the Name properties specified or the BaseLayoutItem.BindableName property bound.

Expanded Layout Settings

By default, dock panels that are present within a saved layout, but not present in the DockLayoutManager, are not created when calling the ResoreLayoutFrom... methods. To recreate these panels, set the RestoreLayoutOptions.RemoveOldPanels attached property for a DockLayoutManager to False

Is this topic helpful?​​​​​​​