-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Picker ItemDisplayBinding doesn't work with compiled bindings #23989
Copy link
Copy link
Closed
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorsfixed-in-9.0.0-rc.2.24503.2i/regressionThis issue described a confirmed regression on a currently supported versionThis issue described a confirmed regression on a currently supported versionp/0Current heighest priority issues that we are targeting for a release.Current heighest priority issues that we are targeting for a release.platform/androidplatform/iosplatform/macosmacOS / Mac CatalystmacOS / Mac Catalystplatform/windowspotential-regressionThis issue described a possible regression on a currently supported version., verification pendingThis issue described a possible regression on a currently supported version., verification pendingt/bugSomething isn't workingSomething isn't working
Milestone
Description
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 the x:DataType=models:VocabularyList.
The ContentPage does specify a x:DataType for the view model. This doesn't work:
<Picker x:Name="VocabPicker"
ItemsSource="{Binding VocabLists}"
ItemDisplayBinding="{Binding Name}"
SelectedItem="{Binding VocabList, Mode=TwoWay}" />This does work:
<Picker x:Name="VocabPicker"
ItemsSource="{Binding VocabLists}"
ItemDisplayBinding="{Binding Name, x:DataType=models:VocabularyList}"
SelectedItem="{Binding VocabList, Mode=TwoWay}" />
Steps to Reproduce
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorsfixed-in-9.0.0-rc.2.24503.2i/regressionThis issue described a confirmed regression on a currently supported versionThis issue described a confirmed regression on a currently supported versionp/0Current heighest priority issues that we are targeting for a release.Current heighest priority issues that we are targeting for a release.platform/androidplatform/iosplatform/macosmacOS / Mac CatalystmacOS / Mac Catalystplatform/windowspotential-regressionThis issue described a possible regression on a currently supported version., verification pendingThis issue described a possible regression on a currently supported version., verification pendingt/bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done