title: Prism regions not displaying registered views
body: <p>I'm using PRISM in a SilverLight 4 application. I have a problem where views registered to some regions doesn't get displayed.</p>
  
  <p>When loading a module at startup I register some views to regions as follows:</p>
  
  <pre><code>RegionManager.RegisterViewWithRegion("MyRegion1", typeof(IMySubView1));
  RegionManager.RegisterViewWithRegion("MyRegion2", typeof(IMySubView2));
  </code></pre>
  
  <p>I have a view implementing an interface called IMyView, where the xaml have two contentcontrols with regions defined in a grid like this:</p>
  
  <pre><code>&lt;ContentControl Regions:RegionManager.RegionName="MyRegion1" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Grid.Row="0" Grid.RowSpan="1"/&gt;
  &lt;ContentControl Regions:RegionManager.RegionName="MyRegion2" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" Grid.Row="1" Grid.RowSpan="1"/&gt;
  </code></pre>
  
  <p>I have tried two different methods for adding the view to the main region. Both adds the view and basic elements such as buttons get displayed, but the regions defined in the view does not get filled with associated views.</p>
  
  <p>Method 1:</p>
  
  <pre><code>object obj = _container.Resolve&lt;IMyView&gt;();
  IRegion mainRegion = _regionManager.Regions["MainViewRegion"];
  IRegionManager scoped = mainRegion.Add(obj, "test", true);
  mainRegion.Activate(obj);
  
  // Enabling the following call, it will fail saying the region MyRegion1 does not exist. Feels like it should?
  // IRegion myRegion = scoped.Regions["MyRegion1"];
  </code></pre>
  
  <p>Method 2:</p>
  
  <pre><code>object obj = _container.Resolve&lt;IMyView&gt;();
  _regionManager.AddToRegion("MainViewRegion", obj);
  _regionManager.Regions["MainViewRegion"].Activate(obj);
  </code></pre>
  
  <p>It feels like the regions defined in the xaml file doesn't get registered, and because of that the registered views do not get displayed.</p>
  
  <p>The MainViewRegion is defined in the shell in a TabControl as this:</p>
  
  <pre><code>&lt;TabControl Margin="8,0,8,8" Regions:RegionManager.RegionName="MainViewRegion"&gt;
  </code></pre>
  
  <p>Any suggestions on solving my problem will be greatly appreciated!</p>