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

New Post: Scope Regions Nested View - WPF C# Prism 5.0 MEF

$
0
0
I got a work around for this.

In Parent I defined the ContentControl as
<ContentControl x:Name="FooChildContentControl" />

Then in the Code behind of Parent Control I create a new instance of regionManager and set to Child control as under
        IRegionManager regionManager = ServiceLocator.Current.GetInstance<IRegionManager>();
        RegionManager rm = new RegionManager();
        RegionManager.SetRegionManager(this.FooChildContentControl, rm);
        RegionManager.SetRegionName(this.FooChildContentControl, "FooChildRegion");
        rm.RegisterViewWithRegion("FooChildRegion", typeof(fooChildView ));

Viewing all articles
Browse latest Browse all 1878

Trending Articles



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