How to change the RadPane's order in RadPaneGroup?

3 posts, 1 answers
  1. Jonathan
    Jonathan avatar
    34 posts
    Member since:
    Jan 2016

    Posted 15 Oct 2016 Link to this post

    Hi, I have some RadPanes in a RadPaneGroup, and I want to change one of the RadPane's order,  just like to the first tab position or somewhere. How to do it? 


  2. Answer
    Nasko avatar
    692 posts

    Posted 19 Oct 2016 Link to this post

    Hello Jonathan,

    From the provided description of your requirement you are trying to change the current position of a Pane from code-behind. RadPanes are placed inside RadPaneGroups which on the other hand derives from ItemsControls. So, in order to change the position of a Pane placed inside the PaneGroup you need to implement some custom logic for the Items collection of the PaneGroup. For example the following code-snippet will move the first to index 1:
    private void Button_Click(object sender, RoutedEventArgs e)
        var itemToMove = paneGroup.Items.GetItemAt(0);
        paneGroup.Items.Insert(1, itemToMove);

    Hope the provided information will be helpful for you.

    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. Jonathan
    Jonathan avatar
    34 posts
    Member since:
    Jan 2016

    Posted 22 Oct 2016 in reply to Nasko Link to this post

    Thank you Nasko. I use your code and it's well.
Back to Top