title: How to inject views into TabControl using Prism?
body: <p>I followed from the quick start example about UICompositon. In my case I had a project A to hold the TabControl, a project B to hold the DataGrid which act as Content to be injected into the TabControl.</p>
  
  <p>The TabControl has no viewModels, It uses</p>
  
  <pre><code>&lt;Style TargetType="{x:Type TabItem}" x:Key="HeaderStyleS"&gt;
          &lt;Setter Property="Header"
                  Value="{Binding RelativeSource={RelativeSource Self}, 
                  Path=Content.DataContext.ViewName}" /&gt;
  &lt;/Style&gt;
  &lt;TabControl regions:RegionManager.RegionName="TabRegion" ItemContainerStyle="{StaticResource HeaderStyleS}"&gt;&lt;/TabControl&gt;
  </code></pre>
  
  <p>Project A is only responsible to inject itself into the main shell which is defined in project C;<br/></p>
  
  <pre><code>regionManager.RegisterViewWithRegion("MiddleRegion", () =&gt; container.Resolve&lt;MainTabWindow&gt;());
  </code></pre>
  
  <p>Project B is only responsible to inject itself into region <code>TabRegion</code>, which is defined in A.<br/></p>
  
  <pre><code>regionManager.RegisterViewWithRegion("TabRegion", () =&gt; container.Resolve&lt;MetroDataGrid&gt;());
  </code></pre>
  
  <p>Now The problem is the view-<code>B's Datagrid</code> is not shown on the Gui. The only part works is the <code>ViewName</code>,it verifies <code>Content.Datatext</code> is used correctly.But why the <code>Content DataGrid</code> is not shown?</p>
  
  <p><img src="https://i.stack.imgur.com/LlKoQ.png" alt="enter image description here"></p>