title: WPF TabControl.Resources - Style one tab only
body: <p>I am defining a TabControl as follows:</p>
  
  <pre><code>&lt;TabControl Name="TabsControl"
              ItemsSource="{Binding Tabs}"
              SelectedItem="{Binding SelectedTabViewModel}"&gt;
  
      &lt;TabControl.Resources&gt;
  
          &lt;!-- Rate Tables Tab --&gt;
          &lt;DataTemplate DataType="{x:Type vm:RateTablesViewModel}"&gt;
              &lt;v:RateTablesUserControl /&gt;
          &lt;/DataTemplate&gt;
  
          &lt;!-- Rate Tables Tab --&gt;
          &lt;DataTemplate DataType="{x:Type vm:RulesViewModel}"&gt;
              &lt;v:RulesUserControl /&gt;
  
          &lt;/DataTemplate&gt;
  
          &lt;!-- Rate Tables Tab --&gt;
          &lt;DataTemplate DataType="{x:Type vm:CreateEmployeeMatchViewModel}"&gt;
              &lt;v:CreateEmployeeMatchUserControl /&gt;
          &lt;/DataTemplate&gt;
  
          &lt;!-- Rate Tables Tab --&gt;
          &lt;DataTemplate DataType="{x:Type vm:ReportViewModel}"&gt;
              &lt;v:ReportUserControl /&gt;
          &lt;/DataTemplate&gt;
  
          &lt;!-- System Setup Tab --&gt;
          &lt;DataTemplate DataType="{x:Type vm:SystemSetupViewModel}"&gt;
              &lt;v:SystemSetupUserControl /&gt;
          &lt;/DataTemplate&gt;
  
      &lt;/TabControl.Resources&gt;
  
  
      &lt;TabControl.ItemContainerStyle&gt;
          &lt;Style TargetType="TabItem"&gt;
              &lt;Setter Property="Header" Value="{Binding Header}" /&gt;
          &lt;/Style&gt;
      &lt;/TabControl.ItemContainerStyle&gt;
  
  &lt;/TabControl&gt;
  </code></pre>
  
  <p>In my Dictionary I have the following style:</p>
  
  <pre><code>&lt;!-- Style for showing/hiding Setup tab --&gt;
  &lt;Style x:Key="SetupTabStyle" TargetType="{x:Type TabItem}"&gt;
      &lt;Setter Property="Visibility" Value="Collapsed" /&gt;
      &lt;Style.Triggers&gt;
          &lt;DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, 
                                 AncestorType={x:Type Window}}, Path=DataContext.StartArg}" Value="Setup"&gt;
              &lt;Setter Property="Visibility" Value="Visible" /&gt;
          &lt;/DataTrigger&gt;
          &lt;DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, 
                                 AncestorType={x:Type Window}}, Path=DataContext.StartArg}" Value="Edit"&gt;
              &lt;Setter Property="Visibility" Value="Visible" /&gt;
          &lt;/DataTrigger&gt;
      &lt;/Style.Triggers&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>How do I apply this style to just the SystemSetup tab?</p>