Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
285
XamDockManager LoadLayout is not working as I want
posted

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