title: How To Wpf TabItem Style HeaderTemplate Binding?
body: <p>How To do Wpf TabItem Style HeaderTemplate Binding?</p>
  
  <p>Code:</p>
  
  <pre><code>&lt;TabControl x:Name="tabCtrlMain" ItemsSource="{Binding Items}" &gt;
          &lt;TabControl.Resources&gt;
              &lt;Style TargetType="TabItem"&gt;
                  &lt;Setter Property="HeaderTemplate"&gt;
                      &lt;Setter.Value&gt;
                          &lt;DataTemplate DataType="{x:Type TabItem}"&gt;
                              &lt;TextBlock Text="{Binding FileName}"/&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/Setter.Value&gt;
                  &lt;/Setter&gt;
              &lt;/Style&gt;
          &lt;/TabControl.Resources&gt;
      &lt;/TabControl&gt;
  </code></pre>
  
  <p>this code is not working when binding:</p>
  
  <pre><code>&lt;TextBlock Text="{Binding FileName}"/&gt;
  </code></pre>