Problem positioning RadDocumentPane programattically

2 posts, 0 answers
  1. C Bates
    C Bates avatar
    33 posts
    Member since:
    Oct 2009

    Posted 23 Dec 2009 Link to this post

    Hello, I have this xaml:
                    <docking:RadDocking.DocumentHost> 
                        <docking:RadSplitContainer x:Name="splitContainer1"
                            <docking:RadPaneGroup x:Name="mapGroup" docking:RadDocking.SerializationTag="mapGroup"
                                <!-- The Maps area --> 
                            </docking:RadPaneGroup> 
                        </docking:RadSplitContainer> 
                    </docking:RadDocking.DocumentHost> 
     

    I add RadDocumentPanes like this:
                if (rbRight.IsChecked == true
                { 
                    mapGroup.AddItem(newPane, DockPosition.Left); 
                } 
                else 
                { 
                    mapGroup.AddItem(newPane, DockPosition.Bottom); 
                } 
     

    Regardless of the DockPosition, the new pane is arranged tiled vertically to the right of the original pane.
    What am I doing wrong?

    (I don't know what could have changed, but this code was working earlier today -- the new pane was arranged below the initial pane.)


  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 24 Dec 2009 Link to this post

    Hello C Bates,

     Your code is working as expected. The AddItem method adds panes relatively to the mapGroup pane group that is empty in your case and because of this it is invisible. If you put same pane in it, you will see that the panes are going just where you want to - to the left and to the bottom of the pointed group.

    Hope this helps.

    Best wishes,
    Miroslav Nedyalkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top