This project is read-only.

Frame history from Docking Manager

May 11, 2016 at 11:43 AM
Hello

i display easily a page in a frame (WPF Application).
Now on this page, I put a Docking Manager Control (Avalon Dock). I have to dynamically add pages to Docking manager as Tab. so I use the following code.

i wrap the Page in a Frame before set it as Content Source
var documentPane = DocManager.Layout.Descendents().OfType<LayoutDocumentPane>().FirstOrDefault();
             LayoutDocument layoutDocument = new LayoutDocument { Title = "Home Page", ContentId = "HomePage" };
  
             for (var ix = 0; ix < documentPane.ChildrenCount; ix++)
                 if (documentPane.Children[ix].ContentId == strid)
                 {

                     documentPane.Children[ix].IsSelected = true;
                     return;
                 }
              HomePage hp = new HomePage();
             layoutDocument.IsSelected = true;
             layoutDocument.Content = new Frame() { Content = hp };
             documentPane.Children.Add(layoutDocument);
for each new tab created, I would like to get it back in the history of the main frame.

how can i achieve that ?

thanks