title: WPF TabControl apply TabItem style insead of overriding it (while using ItemSource)
body: <p>I have a parent TabControl with a custom TabItem style:</p>
  
  <pre><code>&lt;TabControl ItemsSource="{Binding TabViewModels}" SelectedIndex="0" Padding="0,0,0,0" BorderThickness="0,0,0,0" Panel.ZIndex="1"&gt;
  
      &lt;TabControl.Resources&gt;
  
          &lt;Style TargetType="{x:Type TabItem}"&gt;
              &lt;Setter Property="Template"&gt;
                  &lt;Setter.Value&gt;
                      &lt;ControlTemplate TargetType="{x:Type TabItem}" &gt;
  
                          &lt;Border Name="Border" CornerRadius="6,6,0,0" Margin="0,0,2,2"&gt;
                              &lt;ContentPresenter TextBlock.TextAlignment="Center" TextBlock.FontSize="14"
                                          Height="40" Width="auto" Content="{Binding Path=TabName}" Margin="12,2,12,2"/&gt;
                          &lt;/Border&gt;
  
                          &lt;ControlTemplate.Triggers&gt;
                              &lt;Trigger Property="IsSelected" Value="True"&gt;
                                  &lt;Setter TargetName="Border" Property="Background" Value="#00B6FA" /&gt;
                              &lt;/Trigger&gt;
                              &lt;Trigger Property="IsSelected" Value="False"&gt;
                                  &lt;Setter TargetName="Border" Property="Background" Value="LightGray" /&gt;
                              &lt;/Trigger&gt;
                          &lt;/ControlTemplate.Triggers&gt;
  
                      &lt;/ControlTemplate&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
          &lt;/Style&gt;
  
          &lt;Style TargetType="TabPanel"&gt;
              &lt;Setter Property="HorizontalAlignment" Value="Right"/&gt;
          &lt;/Style&gt;
  
      &lt;/TabControl.Resources&gt;
  
      &lt;TabControl.ContentTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;ContentControl Content="{Binding Path=. }"/&gt;
          &lt;/DataTemplate&gt;
      &lt;/TabControl.ContentTemplate&gt;
  
  &lt;/TabControl&gt;
  </code></pre>
  
  <p>Inside one of the Tabs of the parent TabControl I have a child TabControl.
  The problem is that the child TabControl automaticly takes the custom TabItem style because I override it as you can see above. What I want is that the child TabControl takes the default windows style for the TabItems.
  Is this possible to apply the custom Tab Item instead of override it and using an ItemSource?</p>