Tutorial :Several RadioButtons in a group unhandling event



Question:

If you have several radiobuttons in a group, and you have Checked event handlers in your code behind, if a radiobutton is checked how do you cancel this event handling so that the new radiobutton clicked does not get selected and your original checked button stays checked? The code in the event handler in the code behind distinguishes this - radiobutton is clicked the event handler checks some condition, if condition is false do not check new button.


Solution:1

On Mouse PreviewDown event, you can check the condition and set e.Handled=true (IF you don't want to check or uncheck)


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »