microsoft / microsoft/microsoft-ui-xaml
RadioButtons SelectionChanged trigger twice
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Describe the bug
This has been an issue in UWP in #3128 , and someone was even kind enough to make a PR to fix it #3137 , but you guys just closed it because winui2 is no longer developed? And don't even check for it in winui3? So I just wasted another hour stumble upon this issue in WinUI3.
### Steps to reproduce the bug
1. Create a new winui3 project
2. In `MainWindow.xaml` use this code
```xml
```
3. In the handler code, just add a debug print.
4. The initial selection will trigger it once as expected. Select another item, this event handler will be triggered twice.
### Expected behavior
_No response_
### Screenshots
_No response_
### NuGet package version
WinUI 3 - Windows App SDK 1.5.6: 1.5.240802000
### Windows version
Windows 11 (22H2): Build 22621
### Additional context
[Repro](https://github.com/HO-COOH/WinUI-Bug/tree/main/16-RadioButtonsSelectionChangedTriggerTwice)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the repro's MainWindow.xaml and RadioButtons_SelectionChanged handler, then run it against Windows App SDK 1.5.6 to confirm the duplicate event. Trace the RadioButtons selection-change path and verify that selecting another item produces one SelectionChanged callback, while the initial selection still behaves as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100