title: Prism, Unity, and Multiple Views ala MDI
body: <p>I'm trying to create an application similar to Visual Studio in that we have a main content area (i.e. where documents are displayed in a TabControl, not a true MDI interface), with a menu on the side.</p>
  
  <p>So far, I have <em>everything</em> working, except the content.  My goal is that when a user double clicks on an item in the navigation menu on the side, it opens the document in the Content region.  This works, but every time I double click it spawns a <em>new</em> instance of that same view.  There's a chance that I could have multiple views of the same type (but different "names") in the TabControl content container.</p>
  
  <p>Right now, my code looks something like this...</p>
  
  <pre><code>            IRegion contentRegion = IRegionManager.Regions[RegionNames.ContentRegion];
  
              object view = IUnityContainer.Resolve(viewModel.ViewType, viewModel.UniqueName);
  
              if (!IUnityContainer.IsRegistered(viewModel.ViewType, viewModel.UniqueName))
              {
                  IUnityContainer.RegisterInstance(viewModel.UniqueName, view);
                  contentRegion.Add(view);
              }
  
              contentRegion.Activate(view);
  </code></pre>
  
  <p>However, it appears that the view is <em>never</em> registered, even though I register it...  I imagine I'm probably doing this wrong -- is there another way to do this? (re: the right way)</p>