question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RadioButtons: SelectionChanged event argument can contain null items as its selected/deselected items

See original GitHub issue

Describe 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:open
  • Created 3 years ago
  • Reactions:3
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
SnowyWreathcommented, Jul 29, 2023

Bad bot. Do not close.

0reactions
github-actions[bot]commented, Jul 29, 2023

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RadioButtons.SelectionChanged Event
Handle the SelectionChanged event to take action when an option is chosen. You can get the selected item from the control's SelectItem property...
Read more >
Guidelines for radio buttons - Windows apps
Learn how to use radio buttons to let users select one option from a collection of two or more mutually exclusive, but related,...
Read more >
How to Uncheck radio button in WPF (MVVM)
user can leave selected item as null, indicating no item is selected. My custom style for the ListBox removes the borders and background...
Read more >
RadioButtonList | DotVVM Documentation
The SelectedValue property is bound to a property which contains the item from the DataSource collection which was selected in the control.
Read more >
Create radio buttons — radioButtons - Shiny - Posit
Create a set of radio buttons used to select an item from a list. radioButtons( inputId, label, choices = NULL, selected = NULL,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found