Hello, I am trying to convert my app in WPF to work with AvalonDock. I have a few windows(about 10) and main form that has DockingManager. I would like to put those windows inside that DockingManager. I've tried this:
<ad:DockingManager x:Name="MainWindow">
<ad:DocumentPane x:Name="Windows">
</ad:DocumentPane>
</ad:DockingManager>
FormDocumentSearch formDocumentSearch = new FormDocumentSearch(dc, this); //create window
DockableContent dct = new DockableContent() { Title = "Window" }; //create DockableContent
dct.Content = formDocumentSearch; //put the window in the DockableContent
Windows.Items.Add(dct);
This gives me the following error: Window must be the root of the tree. Cannot add Window as a child of Visual.
What can I do? How can I put a window or how to modify them so that I can still use the designer and have them in AvalonDock?