var parentGrid = checkBox.ParentOfType<GridViewDataControl>();
if(checkBox.IsChecked.Value)
parentGrid.SelectAll();
else
parentGrid.UnselectAll();
}
If you would like the checkboxes of all cells to have the same alignment you can create a simple cell style and use the CellStyle property of the GridViewSelectColumn: