Introduces a new problem, both Iregionviewregistry and Iregionmanager have registerviewwithregion methods, is there a difference between them?
The answer is--No. We have already analyzed that the mappings between Iregionmanager and Regionmanager have been established by default in Unitybootstrapper. So, just look at the Regionmanager in the prism frame.
The following is the Regionmanager Registerviewwithregion method, which is an extension method:
public static Iregionmanager registerviewwithregion (this iregionmanager regionmanager, string regionname, Type ViewType ) { var regionviewregistry = servicelocator.current.getinstance<iregionviewregistry> (); Regionviewregistry.registerviewwithregion (Regionname, viewtype); return Regionmanager;}
Oh, it's still going to call Regionviewregistry's Registerviewwithregion method indirectly.
Or the old saying, the same thing.
WPF Prism Iregionmanager and Iregionviewregistry