-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Picker ItemDisplayBinding doesn't work with compiled bindings #23989
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Open similar issues:
Closed similar issues:
|
This is likely caused by #22056 and it would also break with .NET 9 in Release mode where the binding would be compiled with the wrong source data type. There is a mismatch between the declared |
I did some testing, on the net9.0 branch (but should be similar on 'main'):
so,
|
- re-enable XC0022 and XC0023 as WarningsNotAsErrors - do not consider thar x:DataType is inherited on Picker items - fixes #23989
Picker.ItemDisplayBinding for example shouldn't inherit parent DataType - fixes #23989
Picker.ItemDisplayBinding for example shouldn't inherit parent DataType - fixes #23989
- re-enable XC0022 and XC0023 as WarningsNotAsErrors - do not consider thar x:DataType is inherited on Picker items - fixes #23989
This is still happening on MAUI 8.0.82. But it still doesn't show up even though the Source has data. |
Picker.ItemDisplayBinding for example shouldn't inherit parent DataType - fixes #23989
* [X] do not look for parent DataType on collections - re-enable XC0022 and XC0023 as WarningsNotAsErrors - do not consider thar x:DataType is inherited on Picker items - fixes #23989 * fixtrimming
Picker.ItemDisplayBinding for example shouldn't inherit parent DataType - fixes #23989
Change the heuristic for deciding if we need ot ignore parent DataType, as DataTrigger.Binding shoud inherit it, and Picker.ItemDisplayNameBinding should not this is an alternate fix for #23989, partially replaces #24513, and will help fixing #25141 together with #24152 Co-authored-by: Stephane Delcroix <[email protected]>
Description
When I use
ItemDisplayBinding
in 8.0.80 nightly or .NET 9 Preview 7, the picker doesn't populate as I'd expect.I can get around it using a
ToString
override on the model, or by providing thex:DataType=models:VocabularyList
.The
ContentPage
does specify ax:DataType
for the view model. This doesn't work:This does work:
Steps to Reproduce
https://github.com/davidortinau/SentenceStudio/blob/main/src/SentenceStudio/Pages/Lesson/LessonStartPage.xaml
My testing with the original code:
8.0.71 - Debug - Good
8.0.71 - Release - Good
8.0.80 - Debug - Sad
8.0.80 - Release - Good
Link to public reproduction project repository
No response
Version with bug
Nightly / CI build (Please specify exact version)
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.61 SR6.1
Affected platforms
iOS, Android, Windows, macOS
Affected platform versions
No response
Did you find any workaround?
Yes, as described
Relevant log output
No response
The text was updated successfully, but these errors were encountered: