Hello,
i downloaded the sample from http://es.infragistics.com/community/blogs/blagunas/archive/2013/09/24/xamdockmanager-data-binding-contentpanes-with-mvvm.aspx
Saving of the Layout is working but not loading:
private string filePath = @"d:\temp\layout.xml"; public void SaveLayout() { using (FileStream fs = new FileStream(filePath, FileMode.Create, FileAccess.Write)) { DockManager.SaveLayout(fs); } } public void LoadLayout() { using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read)) { DockManager.LoadLayout(fs); } }
XAML:
<dockManager:XamDockManager x:Name="DockManager"> <dockManager:XamDockManager.Panes> <dockManager:SplitPane SplitterOrientation="Horizontal" dockManager:XamDockManager.InitialLocation="DockedLeft"> <dockManager:TabGroupPane> <i:Interaction.Behaviors> <wpfApplication2:TabGroupPaneItemsSourceBehavior HeaderMemberPath="Title" ItemsSource="{Binding LeftPanes}" /> </i:Interaction.Behaviors> </dockManager:TabGroupPane> </dockManager:SplitPane> <dockManager:SplitPane SplitterOrientation="Horizontal" dockManager:XamDockManager.InitialLocation="DockedRight"> <dockManager:TabGroupPane> <i:Interaction.Behaviors> <wpfApplication2:TabGroupPaneItemsSourceBehavior HeaderMemberPath="Title" ItemsSource="{Binding RightPanes}" /> </i:Interaction.Behaviors> </dockManager:TabGroupPane> </dockManager:SplitPane> <dockManager:SplitPane SplitterOrientation="Horizontal" dockManager:XamDockManager.InitialLocation="DockedBottom"> <dockManager:TabGroupPane> <i:Interaction.Behaviors> <wpfApplication2:TabGroupPaneItemsSourceBehavior HeaderMemberPath="Title" ItemsSource="{Binding BottomPanes}" /> </i:Interaction.Behaviors> </dockManager:TabGroupPane> </dockManager:SplitPane> </dockManager:XamDockManager.Panes> <dockManager:DocumentContentHost> </dockManager:DocumentContentHost> </dockManager:XamDockManager>
When i load the Panes are like i filles in the ItemsSource (LeftPanes, ..)
I load the Panes into the Dockmanager and after that i call the LoadLayout Method, but nothings change =(
Hope you can help me
I am just checking if you got this worked out or you still require any assistance or clarification on the matter.