Replies: 1 comment 4 replies
-
Point 1:
Point 2: You should always be able to get the current status of the property within the event using |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are two problems with handling the 'IsCheckedChanged' event for Avalonia RadioButtons:
Fires twice - first for the radio button becoming checked and then for the radio button becoming unchecked. The is more of an annoyance and other frameworks have the same behavior.
A more serious problem is that the 'IsChecked' values are incorrect on the first event firing - both the radio button changing its 'IsChecked' property from 'false' to 'true' has 'IsChecked' equal to 'true' and the radio button changing from 'true' to 'false' also has its 'IsChecked' equal to 'true'. The only time it's correct is the second firing of the event.
The above code correctly handles the event without duplication, and more importantly, without error. The is very awkward though. How do others handle these 2 problems?
Beta Was this translation helpful? Give feedback.
All reactions