This is a migrated thread and some comments may be shown as answers.

Problem positioning RadDocumentPane programattically

1 Answer 33 Views
Docking
This is a migrated thread and some comments may be shown as answers.
C Bates
Top achievements
Rank 1
C Bates asked on 23 Dec 2009, 03:24 PM
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.)


1 Answer, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 24 Dec 2009, 08:39 AM
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.
Tags
Docking
Asked by
C Bates
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Share this question
or