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

RadGroup is re-ordering on pinned and unpinned

3 Answers 54 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Manoj
Top achievements
Rank 1
Manoj asked on 20 Jun 2016, 08:29 AM

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

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 23 Jun 2016, 06:12 AM
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.
0
Manoj
Top achievements
Rank 1
answered on 24 Jun 2016, 11:47 AM

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.

0
Polya
Telerik team
answered on 28 Jun 2016, 12:16 PM
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.
Tags
Docking
Asked by
Manoj
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Manoj
Top achievements
Rank 1
Polya
Telerik team
Share this question
or