wpf usercontrol within usercontrol with the help of region manager
Posted
by Miral
on Stack Overflow
See other posts from Stack Overflow
or by Miral
Published on 2010-06-09T11:48:03Z
Indexed on
2010/06/09
11:52 UTC
Read the original article
Hit count: 638
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);
© Stack Overflow or respective owner