RadioButtons: SelectionChanged event argument can contain null items as its selected/deselected items
See original GitHub issueDescribe the bug
The RadioButtons.SelectionChanged event args contain null
items as selected/deselected items. For example, when setting the initial RadioButtons
selection (via code or click interaction), not only does the SelectionChangedEventArgs instance say that an item has been selected, but also that an item has been deselected (SelectionChangedEventArgs.RemovedItems.Count = 1). However, there is no such item being deselected (as none was selected before) and SelectionChangedEventArgs.RemovedItems[0] returns null. Thus this could lead to apps to crash if developers trust SelectionChangedEventArgs.RemovedItems to only contain non-null elements (and the expectation is just that).
Expected behavior
No null
items should be listed. List count should be 0.
Version Info Microsoft.UI.Xaml 2.4.0 (and earlier) Microsoft.UI.Xaml 2.5 previews
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:7 (2 by maintainers)
Top GitHub Comments
Bad bot. Do not close.
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.