i'm trying to create a DataGrid with a column of checkboxes. On that CheckBox-column's header, i'd like to have a "check/uncheck all"-type of checkbox.
App is using WPF, .NET 4 and MVVM Light.
Here's the code:
XAML:
...
ViewModel:
private ObservableCollection _reportListItems;
public ObservableCollection ReportListItems
{
get
{
return this._reportListItems;
}
private set
{
this._reportListItems = value;
this.RaisePropertyChanged("ReportListItems");
}
}
....
public bool CheckAll
{
get { return this._checkall; }
set
{
this._checkall = value;
foreach (var reportListItemModel in ReportListItems)