In Composite WPF (Prism), what is the difference between IRegion.Add and IRegionManager.RegisterViewWithRegion?
问题 In Composite WPF (Prism), when adding modules to the IRegionManger collection, what is the difference between using IRegion.Add and IRegionManager.RegisterViewWithRegion? IRegion.Add public void Initialize() { _regionManager.Regions["MainRegion"].Add( new ModuleAView() ); } IRegionManager.RegisterViewWithRegion public void Initialize() { _regionManager.RegisterViewWithRegion( "MainRegion", typeof( ModuleAView ) ); } 回答1: The difference is who is responsible for creating the view. In the