RadGroup is re-ordering on pinned and unpinned

4 posts, 0 answers
  1. Manoj
    Manoj avatar
    3 posts
    Member since:
    Jun 2016

    Posted 20 Jun Link to this post

    Hi,
    I am having 5 RadGroup inside  RadSplitContainer in my View and data binding is happening through using PRISM and MVVM.
    When the RadGroup is getting pinned and unpinned, that particular RadGroup is moving to last in the sequence.
    I don't want this behavior. I want the group show in the same sequence as it is declared in XAML.

    Please suggest how I can achieved this.
    --
    Thanks & Regrads

    Manoj S

  2. Nasko
    Admin
    Nasko avatar
    585 posts

    Posted 23 Jun Link to this post

    Hello Manoj,

    In its current implementation RadDocking does not support the desired by you functionality out of the box. However, what we could suggest you in order to achieve a similar functionality is to use the Pin\Unpin events of RadDocking. They occur before the Pane is unpinned/pinned and inside them you could get the pane and place it to the desired position of the PaneGroup - the PaneGroups derives from ItemsControls and provide methods such as Insert that could help you to place the Pane to the desired position. In order to preserve the MVVM pattern you could also use the EventToCommandBehavior.

    We hope this will help you.

    Regards,
    Nasko
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Manoj
    Manoj avatar
    3 posts
    Member since:
    Jun 2016

    Posted 24 Jun in reply to Nasko Link to this post

    This approach is not working correctly. It need to detach pane from visual tree and again in case of insert or insertatindex the actual UI of RadDocking is getting distorted.

    Please suggest some better approach.

  5. Polya
    Admin
    Polya avatar
    199 posts

    Posted 28 Jun Link to this post

    Hi Manoj,

    This is the default RadDocking behavior for this scenario when a pinned Pane is unpinned it is added at the end of the UnpinnedPanes collection of the PaneGroup. The only way to avoid that is to hook to the Unpin event of the Docking control and manually reorder the Panes in the UnpinnedPanes collection (you will need to remove all and add them in the correct order).
    I've prepared a sample project demonstrating this approach. In it the Panes are ordered by their Header and everything works as expected.

    Please find the project attached.

    Regards,
    Polya
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top