This project is read-only.

DockingManager Child

Nov 6, 2009 at 1:40 AM


I am creating a dockingmanager and other controls runtime. I have already made a xaml file and now i am doing it runtime to give more controls to user.

My XAML file is as below:


<AvalonDock:DockingManager x:name="dockManager">

<AvalonDock:resizingpanel orientation "horizontal">

-------------Controls ----------------

<AvalonDock:resizingpanel Orientation=verticle>





NOw i am trying to do the same by throguth the code behind.

I have created demo file with private controls

        private AvalonDock.DockingManager myDockManager = new AvalonDock.DockingManager();
        private AvalonDock.ResizingPanel myHoriResizingPanel = new AvalonDock.ResizingPanel();
        private AvalonDock.DockablePane myHoriDockpane = new AvalonDock.DockablePane();
        private AvalonDock.ResizingPanel myVerResizingPanel1 = new AvalonDock.ResizingPanel();
        private AvalonDock.ResizingPanel myVerResizingPanel2 = new AvalonDock.ResizingPanel();
        private AvalonDock.DockableContent projectPane = new AvalonDock.DockableContent();
        private AvalonDock.DockableContent projectExplorer = new AvalonDock.DockableContent();
        private AvalonDock.DockableContent eventContent = new AvalonDock.DockableContent();
        private AvalonDock.DockableContent tmsSelectChannelContent = new AvalonDock.DockableContent();
        private AvalonDock.DockableContent surfaceContent = new AvalonDock.DockableContent();

and i am adding them like

myHoriResizingPanel.Orientation = System.Windows.Controls.Orientation.Horizontal;
            myVerResizingPanel1.Orientation = System.Windows.Controls.Orientation.Vertical;
            myVerResizingPanel2.Orientation = System.Windows.Controls.Orientation.Vertical;           


Now thr problem is i am not able to add the controls into the docking manager. I was looking at the document of avalone and they mention about addchild(object) method it is not displaying anywhere??

My point is how to add the children controls to the avalonedock docking manger runtime??



Nov 6, 2009 at 2:06 AM

Hmm. It was easy. I didnt see the contentcontrol class ..



            myDockManager.Content = myHoriResizingPanel;
            myDockManager.Content = myVerResizingPanel1;
            myDockManager.Content = myVerResizingPanel2;

But now itis not showing anything...........

            myDockManager.Content = myHoriResizingPanel.Height;
            myDockManager.Content = myVerResizingPanel1;
            myDockManager.Content = myVerResizingPanel2;

            myHoriResizingPanel.Width = 100;
            myHoriResizingPanel.Height = 100;
            myVerResizingPanel1.Height = 100;
            myVerResizingPanel1.Width = 200;