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

Flipping the RadPaneGroup Position

3 Answers 39 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Abner
Top achievements
Rank 1
Abner asked on 16 Dec 2014, 03:57 PM
Hi Guys,

I trying to find a way to flip the RadPaneGroup from one side to another, meaning I have in my xaml this scenario:

<telerik:RadDocking Name="RadDockingNew" HasDocumentHost="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0" Padding="0">
            <telerik:RadSplitContainer x:Name="rscMainContent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                <telerik:RadPaneGroup Name="RadGroupPanel1">
                    <telerik:RadPane></telerik:RadPane >
                </telerik:RadPaneGroup>
                <telerik:RadPaneGroup Name="RadGroupPanel2">
                    <telerik:RadPane></telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>

When is render the RadGroupPanel1 is on the left side of the window and RadGroupPanel2 is on the right side of the window. 

What I need to know if there is a way by code behind to set the RadGroupPanel2 to the left, and theRadGroupPanel1 to the right? The both just flip the sides.

Thank you


3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 17 Dec 2014, 05:10 PM
Hi Abner,

In order to achieve the desired you could change the order in which RadPaneGroups are set inside RadSplitContainer as needed. Please, check the following code snippet that demonstrates how to achieve that:

var pg = this.splitContainer.Items[1];
this.splitContainer.Items.RemoveAt(1);
this.splitContainer.Items.Insert(0, pg);

Hopes this helps.

Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Abner
Top achievements
Rank 1
answered on 22 Dec 2014, 12:12 PM
Yes that approach worked.

I just did a different way.

RadPaneGroup newRightGroup = new RadPaneGroup();
newRightGroup = RadPaneGroupChartbook;
SplitContainer.Items.Remove(RadPaneGroupChartbook);
SplitContainer.Items.Add(newRightGroup);
 
I basically copy the left item, remove it, and add again, automatically will be added after the item on the right. That makes the right item to be in the left and the left on the right.
 
0
Abner
Top achievements
Rank 1
answered on 22 Dec 2014, 12:13 PM
Thanks Nasko
Tags
Docking
Asked by
Abner
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Abner
Top achievements
Rank 1
Share this question
or