protected override void OnItemCheck(ItemCheckEventArgs e)
{
base.OnItemCheck(e);
if (this.isUpdatingCheckStates)
return;
// Get the checked/unchecked item
var item = Items[e.Index] as FlagCheckedListBoxItem;
// Update other items
this.UpdateCheckedItems(item, e.NewValue);
}