title: Prism error 'The region manager does not contain the region'
body: <p><a href="https://i.stack.imgur.com/qbAs1.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>I am developing a Prism Sample application with WPF following MVVM pattern, but it has some problem in my application when it pass below code :</p>
  
  <pre><code>var view = _container.Resolve&lt;DummyView&gt;();
  IRegion region = _regionMansger.Regions["ViewInjectionMain_MainRegion"];
  </code></pre>
  
  <p>I have tried out the solution proposed in other stackoverplow posts but it doesn't work.</p>
  
  <p>(<a href="https://github.com/TKLeeDev/wpf-PrismSample.git" rel="nofollow noreferrer">project github here</a>). </p>
  
  <pre><code>     class ViewInjectionMainViewModel : BindableBase
          {
              IUnityContainer _container;
              IRegionManager _regionMansger;
              public ViewInjectionMainViewModel(IUnityContainer container, IRegionManager regionManager)
              {
                  _container = container;
                  _regionMansger = regionManager;
  
                  var view = _container.Resolve&lt;DummyView&gt;();
                  IRegion region = _regionMansger.Regions["ViewInjectionMain_MainRegion"];
  
                  region.Add(view);
              }
          }
  
    class Bootstrapper : UnityBootstrapper
      {
          protected override DependencyObject CreateShell()
          {               
              return this.Container.Resolve&lt;MainWindow&gt;();    
          }    
  
          protected override void InitializeShell()
          {
              base.InitializeShell();
  
              var regionManager = this.Container.Resolve&lt;IRegionManager&gt;();    
  
              if (regionManager != null)
              {
                  regionManager.RegisterViewWithRegion("MainRegion", typeof(FirstView));
              }
  
  
              Container.RegisterType&lt;object, RegionBasic&gt;("RegionBasic");
              Container.RegisterType&lt;object, RegionControlMain&gt;("RegionControlMain");
              Container.RegisterType&lt;object, DummyView&gt;("DummyView");
              Container.RegisterType&lt;object, ViewInjectionMain&gt;("ViewInjectionMain");
  
              Application.Current.MainWindow.Show();
          }
  
          protected override void ConfigureModuleCatalog()
          {
              var catalog = (ModuleCatalog)ModuleCatalog;
              catalog.AddModule(typeof(ModuleA.ModuleAModule));
              catalog.AddModule(typeof(ModuleB.ModuleBModule));
              catalog.AddModule(typeof(DummyModule.DummyModuleClass));        
          }
      }
  </code></pre>
  
  <p>Thanks.</p>