Picker's SelectedIndexChanged event run infinitely when changing ControlTemplate
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 290
Description
### Description
I want to change the `ControlTemplate` of a content page based on Selected Index in Picker. But the program hangs and the `SelectedIndexChanged` event get called infinitely. I don't know whether this is an issue in picker , in control Template or combination of both. But changing the Selected Index without the ControlTemplate change logic does not cause this issue.
### Steps to Reproduce
Run the Repro project and change the Selected Index of the Picker.
https://github.com/HobDev/MauiBugs/tree/PickerIssue
### Version with bug
6.0.408 (current)
### Last version that worked well
Unknown/Other
### Affected platforms
Android, I was *not* able test on other platforms
### Affected platform versions
Android 11
### Did you find any workaround?
_No response_
### Relevant log output
_No response_
Contributor guide
Research direction
Start by running the linked PickerIssue repro on Android 11 with .NET MAUI 6.0.408 and changing the Picker's selected index. Then trace the interaction between SelectedIndexChanged and the ControlTemplate change. Done means identifying the recurring event path and verifying that changing the index no longer hangs the app.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100