Microsoft Prism and Docking Issue

5 posts, 0 answers
  1. None
    None avatar
    25 posts
    Member since:
    Nov 2013

    Posted 19 Mar 2014 Link to this post

    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.
  2. None
    None avatar
    25 posts
    Member since:
    Nov 2013

    Posted 19 Mar 2014 in reply to None Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. George
    Admin
    George avatar
    1332 posts

    Posted 20 Mar 2014 Link to this post

    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.

     
  5. None
    None avatar
    25 posts
    Member since:
    Nov 2013

    Posted 27 Mar 2014 in reply to George Link to this post

    Thanks. Is there a Unity container example? I am not using the MefContainer. Thanks.
  6. None
    None avatar
    25 posts
    Member since:
    Nov 2013

    Posted 27 Mar 2014 in reply to None Link to this post

    Nevermind, got it working with Unity. Works perfect. Thanks!
Back to Top
UI for WPF is Visual Studio 2017 Ready