Some of DockLayoutManager’s panel groups can contain documents that were created from ViewModel with IDocumentManagerService. To serialize and restore them correctly, it is necessary to perform these steps:
1. Create a style and set a name for DocumentPanel. To do this, bind DocumentPanel.BindableName to a unique property.
2. Apply this style to all documents that will be created from ViewModel.
3. Before serializing DockLayoutManager, serialize all documents created from ViewModel.
4. Before restoring DockLayoutManager, recreate all documents created from ViewModel.