title: How to select all checkboxes by clicking on CheckBox column header of a DatagridCheckBox Column?
body: <p>I have a datagrid with one checkbox column. If anyone clicks on checkbox present in the column header, all check boxes present in that particular column should be checked. How can it be achieved using XAML?</p>
  
  <p><strong>Xaml:</strong></p>
  
  <pre><code>&lt;DataGrid AlternationCount="2" AutoGenerateColumns="False" ItemsSource="{Binding}"  Height="325" HorizontalAlignment="Left" Margin="0,178,0,0" Name="dataGrid1" VerticalAlignment="Top" Width="733" &gt;
              &lt;DataGrid.Columns&gt;                
                  &lt;DataGridTemplateColumn&gt;
                      &lt;DataGridTemplateColumn.Header&gt;
                          &lt;CheckBox Name="colCheckBox" Content="Select All" Width="70" Checked="colCheck_Checked" /&gt;
                      &lt;/DataGridTemplateColumn.Header&gt;
                      &lt;DataGridTemplateColumn.CellTemplate&gt;
                          &lt;DataTemplate&gt;                            
                                  &lt;CheckBox Name="rowCheckBox"  HorizontalAlignment="Center"/&gt;                           
                          &lt;/DataTemplate&gt;
                      &lt;/DataGridTemplateColumn.CellTemplate&gt;
                  &lt;/DataGridTemplateColumn&gt;
                  &lt;DataGridTextColumn Header="ProjectId" Binding="{Binding ProjectId}" Width="200"/&gt;
                  &lt;DataGridTextColumn Header="BaselineStartDate" Binding="{Binding BaselineStartDate}" Width="200"/&gt;
                  &lt;DataGridTextColumn Header="BaselineEndDate" Binding="{Binding BaselineEndDate}" Width="200"/&gt;
              &lt;/DataGrid.Columns&gt;
          &lt;/DataGrid&gt;
  </code></pre>