title: Tabitem WPF change tabitem border instead of background color
body: <p>I was reviewing the code:</p>
  <pre><code>&lt;Window x:Class=&quot;WpfTutorialSamples.Misc_controls.StyledTabItemsSample&quot;
          xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
          xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
          Title=&quot;StyledTabItemsSample&quot; Height=&quot;150&quot; Width=&quot;250&quot;&gt;
      &lt;Grid&gt;
          &lt;TabControl Margin=&quot;10&quot; BorderThickness=&quot;0&quot; Background=&quot;LightGray&quot;&gt;
              &lt;TabControl.Resources&gt;
                  &lt;Style TargetType=&quot;TabItem&quot;&gt;
                      &lt;Setter Property=&quot;Template&quot;&gt;
                          &lt;Setter.Value&gt;
                              &lt;ControlTemplate TargetType=&quot;TabItem&quot;&gt;
                                  &lt;Grid Name=&quot;Panel&quot;&gt;
                                      &lt;ContentPresenter x:Name=&quot;ContentSite&quot;
                                          VerticalAlignment=&quot;Center&quot;
                                          HorizontalAlignment=&quot;Center&quot;
                                          ContentSource=&quot;Header&quot;
                                          Margin=&quot;10,2&quot;/&gt;
                                  &lt;/Grid&gt;
                                  &lt;ControlTemplate.Triggers&gt;
                                      &lt;Trigger Property=&quot;IsSelected&quot; Value=&quot;True&quot;&gt;
                                          &lt;Setter TargetName=&quot;Panel&quot; Property=&quot;Background&quot; Value=&quot;LightSkyBlue&quot; /&gt;
                                      &lt;/Trigger&gt;
                                      &lt;Trigger Property=&quot;IsSelected&quot; Value=&quot;False&quot;&gt;
                                          &lt;Setter TargetName=&quot;Panel&quot; Property=&quot;Background&quot; Value=&quot;White&quot; /&gt;
                                      &lt;/Trigger&gt;
                                  &lt;/ControlTemplate.Triggers&gt;
                              &lt;/ControlTemplate&gt;
                          &lt;/Setter.Value&gt;
                      &lt;/Setter&gt;
                  &lt;/Style&gt;
              &lt;/TabControl.Resources&gt;
              &lt;TabItem Header=&quot;General&quot;&gt;
                  &lt;Label Content=&quot;Content goes here...&quot; /&gt;
              &lt;/TabItem&gt;
              &lt;TabItem Header=&quot;Security&quot; /&gt;
              &lt;TabItem Header=&quot;Details&quot; /&gt;
          &lt;/TabControl&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  <p>The result is:</p>
  <p><a href="https://i.stack.imgur.com/PluiD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PluiD.png" alt="enter image description here" /></a></p>
  <p>My goal is to not change the background of the tabItem but instead change the bottom border of the select tab.  For example is General is selected, it would have the text &quot;General&quot; underlined and colored blue.</p>