I have a CheckedListBox where I want an event after an item is checked so that I can use CheckedItems with the new state.
Since ItemChecked is fired before CheckedItems is updated it won’t work out of the box.
What kind of method or event can I use to be notified when the CheckedItems is updated?
You can use the
ItemCheckevent, if you also check the new state of the item which is being clicked. This is available in the event args, ase.NewValue. IfNewValueis checked, include the current item along with the collection proper in your logic:As another example, to determine if the collection will be empty after this item is (un-)checked: