Flipping the RadPaneGroup Position

4 posts, 0 answers
  1. Abner
    Abner avatar
    10 posts
    Member since:
    Apr 2014

    Posted 16 Dec 2014 Link to this post

    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


  2. Nasko
    Admin
    Nasko avatar
    587 posts

    Posted 17 Dec 2014 Link to this post

    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.

     
  3. DevCraft banner
  4. Abner
    Abner avatar
    10 posts
    Member since:
    Apr 2014

    Posted 22 Dec 2014 in reply to Nasko Link to this post

    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.
     
  5. Abner
    Abner avatar
    10 posts
    Member since:
    Apr 2014

    Posted 22 Dec 2014 in reply to Abner Link to this post

    Thanks Nasko
Back to Top