Skip to content

Saves layout when you close the application and then restores it when you start the application.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/wpf-docklayoutmanager-serialize-docklayoutmanager-when-tabbeddocumentuiservice-is-used

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WPF Dock Layout Manager - Serialize DockLayoutManager When You Use the TabbedDocumentUIService

Some of DockLayoutManager’s panel groups can contain documents that were created from ViewModel with IDocumentManagerService. To serialize and restore these panels and their child documents correctly, it is necessary to perform the following steps.

Item names are used to identify items when saving/restoring the layout. For this reason, it is necessary to set unique names for all DockLayoutManager panels. In the current scenario, this can be done by setting the DocumentPanel.BindableName property in the TabbedDocumentUIService.DocumentPanelStyle.

Another important point is that the DockLayoutManager's save/restore mechanism is not the XamlWriter alternative — it does not save/restore the content of its panels. It is necessary to restore it. In this example, we use the following approach:

  1. Before saving layout settings, serialize all documents created from the ViewModel.
  2. Before restoring settings, recreate all documents.

image

Files to Look At:

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Saves layout when you close the application and then restores it when you start the application.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •