wpf usercontrol within usercontrol with the help of region manager
- by Miral
Sorry for weird title, actually i can only explain my question but cannot put in a few words in the title.
I am developing WPF Composite application with PRISM approach.
I have got a common WPF usercontrol which is gonna be used by all other usercontrol, i.e. usecontrol within a usercontrol. The common usercontrol has got a button "ProcessMultiple" which I want it to behave differently from all usercontrol.
I am using RegionManager to add this views.
I have got PresentationModel for all the usercontrol
IRegion historyUpdaterRegion = _regionManager.Regions["HistoryUpdaterRegion"];
IRegionManager historyUpdaterRegionManager = historyUpdaterRegion.Add(_unityContainer.Resolve<IHistoryDocumentUpdaterPresentationModel>().View, null, true);
historyUpdaterRegionManager.RegisterViewWithRegion("ProcessMultiple", () => _unityContainer.Resolve<IProcessMultiplePresentationModel>().View);
IRegion refundArrivalRegion = _regionManager.Regions["RefundArrivalRegion"];
IRegionManager refundArrivalRegionManager = refundArrivalRegion.Add(_unityContainer.Resolve<IRefundArrivalProcessorPresentationModel>().View, null, true);
refundArrivalRegionManager.RegisterViewWithRegion("ProcessMultiple", () => _unityContainer.Resolve<IProcessMultiplePresentationModel>().View);