title: Customize TabItem DataTemplate
body: <p>How can I make DataTemplate in WPF for TabItems and in each TabItem customize its content?</p>
  
  <p>I need this:</p>
  
  <pre><code>&lt;TabControl&gt;
              &lt;TabControl.ContentTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;Label Content="Name" Name="label1" /&gt;
                      &lt;TextBox Name="name" /&gt;
                      ...
                  &lt;/DataTemplate&gt;
              &lt;/TabControl.ContentTemplate&gt;
              &lt;TabItem Header="Add" Name="tabItem1"&gt;
                  &lt;Grid Height="213"&gt;
                      &lt;Button Content="Add" Name="button1" /&gt;
                  &lt;/Grid&gt;
              &lt;/TabItem&gt;
              &lt;TabItem Header="Edit" Name="tabItem2"&gt;
                  &lt;Grid&gt;
                      &lt;Button Content="Edit" Name="button2" /&gt;
                  &lt;/Grid&gt;
              &lt;/TabItem&gt;
  &lt;/TabControl&gt;
  </code></pre>
  
  <p>but the buttons are not displaying (only content of DataTemplate).</p>