title: WPF - TabItem MouseOver not working as intended
body: <p>I have an issue with the IsMouveOver trigger with a TabItem Element.</p>
  
  <p>When the mouse cursor is on a TabItem, its background color changes, which is what I want => It works.
  However the background color of the TabItem also changes whenever my mouse cursor is on an item inside the TabItem.</p>
  
  <p>Here's the XAML related to the styling:</p>
  
  <pre><code>    &lt;Style x:Key="SupTest" TargetType="{x:Type TabItem}"&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="{x:Type TabItem}"&gt;
                  &lt;Border Margin="2" Name="TabBorder" CornerRadius="6" BorderBrush="Transparent" Background="Transparent" 
                          BorderThickness="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"&gt;
                      &lt;StackPanel Margin="12" Orientation="Horizontal" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"&gt;
                          &lt;Rectangle Width="25" Height="25" Fill="Blue" HorizontalAlignment="Left" Margin="00,0,0,0"&gt;&lt;/Rectangle&gt;
                          &lt;ContentPresenter ContentSource="Header" VerticalAlignment="Center" 
                                            HorizontalAlignment="Stretch" Margin="10,0,0,0"&gt;&lt;/ContentPresenter&gt;
                      &lt;/StackPanel&gt;
                  &lt;/Border&gt;
                  &lt;ControlTemplate.Triggers&gt;
                      &lt;Trigger Property="IsSelected" Value="True"&gt;
                          &lt;Setter Property="Panel.ZIndex" Value="100" /&gt;
                          &lt;Setter TargetName="TabBorder" Property="Background" Value="#FFDFDFDF" /&gt;
                          &lt;Setter TargetName="TabBorder" Property="BorderThickness" Value="2" /&gt;
                          &lt;Setter TargetName="TabBorder" Property="BorderBrush" Value="{DynamicResource WindowTitleColorBrush}"/&gt;
                      &lt;/Trigger&gt;
                      &lt;Trigger Property="IsEnabled" Value="False"&gt;
                          &lt;Setter TargetName="TabBorder" Property="Background" Value="DarkRed" /&gt;
                          &lt;Setter TargetName="TabBorder" Property="BorderBrush" Value="Black" /&gt;
                          &lt;Setter Property="Foreground" Value="DarkGray" /&gt;
                      &lt;/Trigger&gt;
                      &lt;Trigger Property="Border.IsMouseOver" Value="True"&gt;
                          &lt;Setter TargetName="TabBorder" Property="Background" Value="{DynamicResource WindowTitleColorBrush}"/&gt;
                      &lt;/Trigger&gt;
                  &lt;/ControlTemplate.Triggers&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
      &lt;/Style&gt;
  </code></pre>
  
  <p>And the XAML code for the windows itself:</p>
  
  <pre><code>    &lt;TabControl HorizontalAlignment="Stretch" VerticalAlignment="Stretch" TabStripPlacement="Left"
                  BorderThickness="1,0,0,0" BorderBrush="{DynamicResource WindowTitleColorBrush}"&gt;
          &lt;TabItem Header="Item #1" Style="{StaticResource SupTest}"&gt;
               &lt;Grid&gt;
                  &lt;Button Content="Button" HorizontalAlignment="Left" Margin="10" VerticalAlignment="Top" Width="75"/&gt;
              &lt;/Grid&gt;
          &lt;TabItem Header="Item #2" Style="{StaticResource SupTest}"&gt;
               &lt;Grid&gt;
                  &lt;Button Content="Button Teeest" HorizontalAlignment="Left" Margin="10" VerticalAlignment="Top" Width="75"/&gt;
              &lt;/Grid&gt;
          &lt;/TabItem&gt;
      &lt;/TabControl&gt;
  </code></pre>
  
  <p>With this code for example, the IsMouseOver of a TabItem is triggered when the mouse cursor is on the button it contains.</p>
  
  <p>How to fix this? :P</p>
  
  <p>Thanks for the help =)</p>