title: TabItem - how to change template and leave default style?
body: <p>I have the following code:</p>
  
  <pre><code>&lt;Window x:Class="kkk.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="MainWindow" Height="350" Width="525"&gt;
      &lt;Window.Resources&gt;
          &lt;Style x:Key="tabitemstyle" TargetType="{x:Type TabItem}" BasedOn="{StaticResource {x:Type TabItem}}"&gt;
              &lt;Setter Property="Template"&gt;
                  &lt;Setter.Value&gt;
                      &lt;ControlTemplate TargetType="{x:Type TabItem}"&gt;
                          &lt;Grid&gt;
                              &lt;Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"&gt;
                                  &lt;ContentPresenter x:Name="ContentSite" ContentSource="Header"&gt;&lt;/ContentPresenter&gt;
                              &lt;/Border&gt;
                          &lt;/Grid&gt;
                      &lt;/ControlTemplate&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
          &lt;/Style&gt;
      &lt;/Window.Resources&gt;
      &lt;Grid&gt;
  
          &lt;TabControl&gt;
              &lt;TabItem Header="tab1" Style="{StaticResource tabitemstyle}"&gt;&lt;/TabItem&gt;
              &lt;TabItem Header="tab1" Style="{StaticResource tabitemstyle}"&gt;&lt;/TabItem&gt;
          &lt;/TabControl&gt;
  
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>I want to preserve the default style of TabItem - I mean the padding/margins/BorderBrush/BorderThickness and so on... That is why I wrote <code>BasedOn="..."</code>.
  But it doesn't work - I thought it will render same as TabItem without any custom style but it doesn't - it just renders some text (by the ContentPresenter). The style doesn't get default properties values... How I can do it?
  And I need the <code>ControlTemplate</code> inside my style...</p>