title: Checkbox in gridviewcolumn(header)
body: <p>I am using a listview (gridview/gridviewcolumn)
  where the first column
  contains only checkboxes for each row. Instead of adding a select all button I want
  to add a Checkbox into the header of the first column. </p>
  
  <p>Selecting the checkbox in the header will select
  all other checkboxes and vice versa.</p>
  
  <p>How can I do that in xaml?</p>
  
  <p>Update:
  This is the important part of my xaml code. (simplified)</p>
  
  <pre><code>&lt;ListView ItemSource="..."&gt;
  &lt;ListView.View&gt;
  &lt;GridView&gt;
  
  &lt;GridViewColumn&gt;
    &lt;GridViewColumn.CellTemplate&gt;
      &lt;DataTemplate&gt;
        &lt;StackPanel Orientation="Horizontal"&gt;
           &lt;CheckBox IsChecked="{Binding IsSelected}" /&gt;
        &lt;/StackPanel&gt;
      &lt;/DataTemplate&gt;
    &lt;/GridViewColumn.CellTemplate&gt;
  &lt;/GridViewColumn&gt;
  
  &lt;/GridView&gt;
  &lt;/ListView.View&gt;
  &lt;/ListView&gt;
  </code></pre>