I have a group of WPF CheckBoxes that have a Checked event handler that handles some logic when the user clicks on one of them. However, I also have a “Clear All” button that, when clicked, will clear all the checkboxes. If the user clicks on the “Clear All” button, I do NOT want the checkboxes to fire their Checked event. Is there a way of doing this?
Share
Remove the event handler at the beginning of the in the Clear All button’s event handler and then re-add the event handler at the end of the Clear All button’s event handler.
Here’s a dirty sample:
XAML
Code Behind