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

Microsoft Prism and Docking Issue

4 Answers 60 Views
Docking
This is a migrated thread and some comments may be shown as answers.
None
Top achievements
Rank 1
None asked on 19 Mar 2014, 08:48 PM
I am using a Unity dependency container and microsoft Prism. I am injecting views into my docking panels, and this works fine. I have a button on Pane  A that injects a new view into Pane B. Both of these panes are docked. If I undock ether of the panes and click the button in Pane A, the region manager cannot find the region anymore, and I get the following exception.

An unhandled exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in Microsoft.Practices.Prism.dll
Additional information: The region manager does not contain the MapInteractionPanel region.

This is the line that causes the exception:
 IRegion region = regionManager.Regions["MapInteractionPanel"];

This works PERFECTLY fine if I leave both panes docked, so clearly the telerik docking is doing something when it undocks. Any ideas? Thanks.

4 Answers, 1 is accepted

Sort by
0
None
Top achievements
Rank 1
answered on 19 Mar 2014, 08:53 PM
I forgot to say, when I detatch pane B, then re-attach it, then click the button in Pane A, it works fine. So it seems undocking the pane removes the region, but I don't know where it "moves" it to.
0
George
Telerik team
answered on 20 Mar 2014, 01:27 PM
Hello Matt,

When a pane goes floating, the pane is removed from the group and it's placed inside a new group inside ToolWindow. Maybe this causes the problem.

We have an example how to implement RadDocking with PRISM here - http://blogs.telerik.com/xamlteam/posts/13-12-11/using-raddocking-with-prism-in-wpf-silverlight. Please, refer to it and let me know if this helps.

Regards,
George
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
None
Top achievements
Rank 1
answered on 27 Mar 2014, 04:05 PM
Thanks. Is there a Unity container example? I am not using the MefContainer. Thanks.
0
None
Top achievements
Rank 1
answered on 27 Mar 2014, 04:33 PM
Nevermind, got it working with Unity. Works perfect. Thanks!
Tags
Docking
Asked by
None
Top achievements
Rank 1
Answers by
None
Top achievements
Rank 1
George
Telerik team
Share this question
or