private void ToggleSelectedRowCheckBoxes()
{
// This doesn't actually toggle all rows. It toggles the first row, and
// all other rows get the check state of that first row.
Object primaryModel = this.GetItem(this.SelectedIndices[0]).RowObject;
this.ToggleCheckObject(primaryModel);
CheckState? state = this.GetCheckState(primaryModel);
if (state.HasValue) {
foreach (Object x in this.SelectedObjects)
this.SetObjectCheckedness(x, state.Value);
}
}