views:

343

answers:

1

I have a WPF application, where when a user unchecks a checkbox, the application will prompt to confirm. If the user chooses not to continue (cancel) is selected, i want to cancel the uncheck event. In another word, i want the checkbox to remain checked.

How can i do that in WPF?

Thanks in advance.

+1  A: 

Probably the cleanest way is to use Data Validation on your binding, where your "IsValid" function is whether the user answers Yes to the prompt.

Update: This article is pretty good too

Paul Betts