-
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
[Windows] Notify changes in Picker ItemsSource #9584
Conversation
@@ -318,6 +318,7 @@ void ResetItems() | |||
((LockableObservableListWrapper)Items).InternalClear(); | |||
foreach (object item in ItemsSource) | |||
((LockableObservableListWrapper)Items).InternalAdd(GetDisplayMember(item)); | |||
Handler?.UpdateValue(nameof(IPicker.Items)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the main change.
if (ItemsSource == null) | ||
return; | ||
|
||
Items.Clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jsuarezruiz @rmarinho I think you have to clear the list before check ItemsSource is null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look @mohachouch our WPF guru :D
This is just a test so i think is fine.
For when a WPF backend to MAUI @mohachouch ? i can help :P
I downloaded the entire dotnet MAUI zip repo. I run .\build.ps1 and my .nuget and .dotnet directories in my user folder are updated. But after I clean and rebuild, the issue still remains. I suspect I am not using this latest build in my project. |
Yes this is still a problem for me. The Items is set when my view model is created but the binding doesn't work. |
Description of Change
Notify changes in Picker ItemsSource (without using ObservableCollection). Fix the issue #9239 updating the Picker ItemsSource.
Issues Fixed
Fixes #9239
Fixes #9496