Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Nested Region within Popup Window

$
0
0
I have a popup window based on Damian's example here. The view that is created within this receives a new scoped region manager. My issue is that within my popup view, further down the tree I need to display two instances of a single sub-view (CommonView) bound to different data. Each instance needs to have its own scoped region manager.

Image

The documentation suggests handling this through view injection but I am unable to get the scoped region manager at the level of AView.

Using IRegionManagerAware, I am able to get the region manager within PopupView. I had hoped that AView would inherit its parent's region manager but the dependency property RegionManager.RegionManager is empty in AView. Adding IRegionManagerAware to AView doesn't help either as the PopupWindowAction doesn't reach that deep.

I also tried adding Damian's RegionManagerRegistrationBehavior (see here) but it never even sees the addition of AView.

Any ideas on how to best make this composition work? I figure I could pass the region manager down through a ViewModel but I'd rather find a way to do this simply through infrastructure or binding.

Thanks

Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>