views:

28

answers:

0

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 "ProcessAll" which I want it to behave differently from all usercontrol.

I am using RegionManager to add this usecontrols as views
I have got PresentationModel for all the usercontrol
Below is the code to add the usercontrol as views and ProcessMultiple control as view within the other parent 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);

alt text