Restoring layout - Document panes

Jun 12, 2011 at 9:52 AM

I would like to add an option to load the layout of opened documents when project is loaded (the division of document pane to groups and the opened documents in the groups).

I can see that the SaveLayout function saves also the individual document panes:

<DocumentPaneResizingPanel ResizeWidth="*" ResizeHeight="*" EffectiveSize="832,384" Orientation="Horizontal">
   <DocumentPane IsMain="true" ResizeWidth="0.5*" ResizeHeight="*" EffectiveSize="413,384" />
   <DocumentPane ResizeWidth="0.5*" ResizeHeight="*" EffectiveSize="413,384" />

But there are no identifiers of the individual document panes.

Is there some way to put the loaded project documents in the correct panes as they were when the document was closed?

Jun 20, 2011 at 1:44 PM


set a value to DockableContent.Name property and it will be saved with the layout. I never tried with DocumentContent but it should be the same.

More ideas on this thread:

Bernard from Sofa, (AvalonDock in composite applications).