private void Item_Checked(object sender, RoutedEventArgs e) { if (IsLoaded) { ItemChecked?.Invoke(this, e); } }
private void CheckedListBoxOnItemCheck(object sender, ItemCheckEventArgs e) { if (e.NewValue == CheckState.Checked) { _checkedIndices.Add(e.Index); CheckedItems.Add(_checkedListBox.Items[e.Index]); } else { _checkedIndices.Remove(e.Index); CheckedItems.Remove(_checkedListBox.Items[e.Index]); } ItemChecked?.Invoke(this, EventArgs.Empty); Invalidate(); }
protected override void OnItemChecked(int position) { base.OnItemChecked(position); ItemChecked?.Invoke(this, new EventArgs()); }