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

Error when using docking w/ MVVM

3 Answers 97 Views
Docking
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
david mcintyre
Top achievements
Rank 1
david mcintyre asked on 21 Feb 2011, 06:18 PM
I implemented an MVVM architecture for the docking control's Itemssource property using your sample solution at http://www.telerik.com/community/forums/silverlight/docking/can-not-drag-radpane-when-binding-the-itemssource-to-radpanegroup.aspx, which relies on some extensions to the current docking control.  I like this architecture, but the problem is that i can no longer use much of the floating, Drag & Drop, or reordering panes without getting errors.  I believe that the problem is that the docking control assumes that its child collection of panes should match the indexing on the VM, so if i add an item w/ index of 5 to the VM, the docking control will also add a new pane w/ an index of 5;  but this causes an error if the pane has been moved or floated b/c the VM is unchanged but the itemscontrol has lost a member.  I encounter the error in the OnItemsSourceCollectionChanged event of the docking pane extension class.  I get the error in my own application and can reproduce it using the sample project in the above thread (after i updated the references to use the current telerik DLLs). 

Can this MVVM architecture be modified to enable all the functionality of the control?  Or does using MVVM require me to strip out its functionality?

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Accepted
Miroslav Nedyalkov
Telerik team
answered on 24 Feb 2011, 06:31 PM
Hi David,

 The reason why we didn't include this functionality in the Docking control is that it might contains some issues. It is just an example, demonstrating an idea, how to use Docking control and MVVM together. As this is not part of the Docking control, we didn't test it much and didn't try any more complex scenarios with it. What I would suggest you is to try to figure out what goes wrong and try to fix it or work-it-around - most probably the issues is within the extensions.

We would be glad to assist you in this. If you could provide us some more detailed information we could also try to figure out what the problem is at our side.

Regards,
Miroslav Nedyalkov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
david mcintyre
Top achievements
Rank 1
answered on 05 Apr 2011, 04:12 PM
I've had to disable the user's ability to remove a pane from the docking control, so they can't have a floating pane or re-dock it to the side.  Whenever a user does that, the docking control gets an error when the user adds the next pane, b/c the docking control doesn't decrement its # of panes when a pane is floated.  Also, the content of the floating or re-docked pane is empty when it's moved. 
0
George
Telerik team
answered on 11 Apr 2011, 09:59 AM
Hi David,

We are not aware of such problem with RadDocking control. I suppose you want to freeze the RadDocking layout. We have a documentation article how to achieve this. Please, refer to the following link - http://www.telerik.com/help/silverlight/raddocking-how-to-freeze-the-layout.html. I hope this article will suit your needs.
 

All the best,
George
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Docking
Asked by
david mcintyre
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
david mcintyre
Top achievements
Rank 1
George
Telerik team
Share this question
or