Prism - drag pane out of region

3 posts, 0 answers
  1. Charles
    Charles avatar
    41 posts
    Member since:
    Mar 2012

    Posted 26 May 2013 Link to this post

    HI

    I've cobbled together a custom region adapter from reading lots of threads on here, and everything works fine.

    However, I've come up against a problem that I'm sure someone must've seen.

    The regions are set on a RadPaneGroup level.  You add your view to a specific region and everything's great.

    If the user then drags this pane out of that group, then the view is no longer in that region.  If they make the view floating, then it's no longer in any defined region - so how so I remove it using the RegionManager?

    Any thoughs appreciated!

    Charlie
  2. Charles
    Charles avatar
    41 posts
    Member since:
    Mar 2012

    Posted 26 May 2013 Link to this post

    Sort of answering my own question - I looked again at the region adapters others had come up with, and mine is a bit different.

    Mine's based loosely on the standard Prism 'SelectorItemsSourceSyncBehavior', which would be used for, say, a tab control - which is what a RadPaneGroup is.

    Where this falls down is that this approach syncs both ways - Region.Views to RadPaneGroup.Items and back again.  So when a user drags an item out of the group, it's removed from the region. This sort of makes sense, but causes the issue I commented on above.

    The route the other adapters take is to only sync one way - Region.Views to RadPaneGroup.Items.  If panes are removed from the RadPaneGroup, they remain in the region until such time as they are removed - unless the pane is closed and removed from RadDocking completely.   When they are removed from Region.Views, they are found wherever they might be in RadDocking and removed.

    I think the whole Prism Regions approach doesn't quite sit right with RadDocking and the ability to move stuff around, but I think the second approach outlined above is about as workable as we're going to get.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Guillaume
    Guillaume avatar
    12 posts
    Member since:
    May 2013

    Posted 27 May 2013 Link to this post

    Hi Charles,

    I think we have the same problem, could you please check my thread : http://www.telerik.com/community/forums/wpf/docking/prism-load-view-in-documenthost-region-problem.aspx ?

    I expose my issue with code examples. Maybe you have an idea to help ?

    Regards,
    Guillaume
Back to Top