title: Setting TabItem foreground color also sets the TabControl foreground color
body: <p>I have a TabControl that I have restyled. The TabItem has a trigger that is fired when the TabItem is selected that changes the TabItem text to bold and green. The problem I have is that the text in the contents of the tab is also set to bold and green.</p>
  
  <p>I can work around this by setting all of my controls in the tab content to be the color and font weight I want, but should I have to do this? So, I have to make sure that every textblock in the contents area has a style that sets the color to black and font weight normal.</p>
  
  <p>How can I set the IsSelected part of the TabItem to show green, but leave the contents of the tab alone?</p>
  
  <p>I've tried to set the foreground of the TabControl to black, but this doesn't work.</p>
  
  <p>You will see from the code sample below that the text on the first tab is green, and I want it to be black, but without setting each control in the tab content.</p>
  
  <p>Code Sample below:</p>
  
  <pre><code>    &lt;Grid&gt;
      &lt;Grid.Resources&gt;
          &lt;!-- Tab item --&gt;
          &lt;Style TargetType="{x:Type TabItem}"&gt;
              &lt;Setter Property="FontSize" Value="14"/&gt;
              &lt;Setter Property="MinWidth" Value="200"/&gt;
              &lt;Setter Property="FocusVisualStyle" Value="{x:Null}"/&gt;
              &lt;Setter Property="Template"&gt;
                  &lt;Setter.Value&gt;
                      &lt;ControlTemplate TargetType="{x:Type TabItem}"&gt;
                          &lt;Grid&gt;
                              &lt;Border Name="Border" Padding="5,2"&gt;
                                  &lt;ContentPresenter ContentSource="Header"/&gt;
                              &lt;/Border&gt;
                          &lt;/Grid&gt;
                          &lt;ControlTemplate.Triggers&gt;
                              &lt;MultiTrigger&gt;
                                  &lt;MultiTrigger.Conditions&gt;
                                      &lt;Condition Property="Border.IsMouseOver" Value="True"/&gt;
                                      &lt;Condition Property="IsSelected" Value="False"/&gt;
                                  &lt;/MultiTrigger.Conditions&gt;
                                  &lt;Setter Property="FontWeight" Value="Bold"/&gt;
                                  &lt;Setter Property="Foreground" Value="Black"/&gt;
                              &lt;/MultiTrigger&gt;
  
                              &lt;MultiTrigger&gt;
                                  &lt;MultiTrigger.Conditions&gt;
                                      &lt;Condition Property="Border.IsMouseOver" Value="False"/&gt;
                                      &lt;Condition Property="IsSelected" Value="False"/&gt;
                                  &lt;/MultiTrigger.Conditions&gt;
                                  &lt;Setter Property="Foreground" Value="Black" /&gt;
                              &lt;/MultiTrigger&gt;
  
                              &lt;Trigger Property="IsSelected" Value="True"&gt;
                                  &lt;Setter Property="Foreground" Value="Green"/&gt;
                                  &lt;Setter Property="FontWeight" Value="Bold"/&gt;
                              &lt;/Trigger&gt;
                          &lt;/ControlTemplate.Triggers&gt;
                      &lt;/ControlTemplate&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
          &lt;/Style&gt;
  
          &lt;!-- Tab control --&gt;
          &lt;Style  TargetType="{x:Type TabControl}"&gt;
              &lt;Setter Property="SelectedIndex" Value="0"/&gt;
              &lt;Setter Property="Template"&gt;
                  &lt;Setter.Value&gt;
                      &lt;ControlTemplate TargetType="{x:Type TabControl}"&gt;
                          &lt;Grid&gt;
                              &lt;Grid.ColumnDefinitions&gt;
                                  &lt;ColumnDefinition Width="200" /&gt;
                                  &lt;ColumnDefinition Width="*" /&gt;
                              &lt;/Grid.ColumnDefinitions&gt;
                              &lt;Border Grid.Column="0" Padding="5" Margin="0,0,5,0" CornerRadius="3"&gt;
                                  &lt;StackPanel Orientation="Vertical"&gt;
                                      &lt;ScrollViewer VerticalScrollBarVisibility="Auto" FocusVisualStyle="{x:Null}"&gt;
                                          &lt;TabPanel IsItemsHost="True"/&gt;
                                      &lt;/ScrollViewer&gt;
                                  &lt;/StackPanel&gt;
                              &lt;/Border&gt;
                              &lt;Border Grid.Column="1" BorderBrush="Black" BorderThickness="0"&gt;
                                  &lt;ScrollViewer VerticalScrollBarVisibility="Auto" FocusVisualStyle="{x:Null}" Padding="10,0"&gt;
                                      &lt;ContentPresenter ContentSource="SelectedContent"/&gt;
                                  &lt;/ScrollViewer&gt;
                              &lt;/Border&gt;
                          &lt;/Grid&gt;
                      &lt;/ControlTemplate&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
          &lt;/Style&gt;
  
      &lt;/Grid.Resources&gt;
  
      &lt;TabControl Name="tabControl" TabStripPlacement="Left"&gt;
          &lt;!-- First tab item --&gt;
          &lt;TabItem IsSelected="True"&gt;
              &lt;TabItem.Header&gt;
                  &lt;StackPanel Orientation="Horizontal"&gt;
                      &lt;TextBlock Text="Profile"/&gt;
                  &lt;/StackPanel&gt;
              &lt;/TabItem.Header&gt;
              &lt;TextBlock Text="Page 1 Sample Text with no foreground set." FontSize="30"/&gt;
          &lt;/TabItem&gt;
  
          &lt;!-- Second tab item --&gt;
          &lt;TabItem IsSelected="True"&gt;
              &lt;TabItem.Header&gt;
                  &lt;StackPanel Orientation="Horizontal"&gt;
                      &lt;TextBlock Text="Profile"/&gt;
                  &lt;/StackPanel&gt;
              &lt;/TabItem.Header&gt;
              &lt;TextBlock Text="Page 2 Sample Text with foreground set manually." FontSize="30" Foreground="Red"/&gt;
          &lt;/TabItem&gt;
      &lt;/TabControl&gt;
  &lt;/Grid&gt;
  </code></pre>