When using a Picker control with its ItemsSource bound to an ObservableCollection, the Picker only responds to additions and deletions in the collection, not to updates in the collection's members.
Picker control bound to an ObservableCollectionPicker's ItemDisplayBinding) of one member of the collectionThe new value should appear in the Picker.
No changes are shown in the Picker.
As a response on StackOverflow indicated, the Picker source code includes a call to UnApply() in GetDisplayMember(). This would seem to indicate that this behavior might be by design -- but if so, it's:
ObservableCollection.Add() and .Remove() work as expectedItemsSource is intended to only work OneWay.Picker the only obligate OneWay control?Here's a sample: https://github.com/grahampcharles/PickerUpdateSample
To clarify, what you are expecting is that if the Picker is using the ItemDisplayBinding property, when that property changes on the underlying item the update display value should be reflected in the Picker.
That's not currently supported, but it would be nice. I'm adding it to our enhancements list.
This issue title is misleading; this doesn't have anything to do with two-way binding, it's just that the Picker does not monitor individual item property changes.
Looking forward to this being fixed, and waiting patiently. Is there any chance this will be on an upcoming sprint sometime soon?
What's the current status of this issue?
Or could you provide us with the workaround?
Btw, issue title is misleading, it has nothing to do with ItemsSource. Can someone change it?
Thanks.
Just a heads up, the referenced source code for this defect does reference ItemsSource as per the MainPage.xaml file.
<Picker x:Name="thePicker" ItemsSource="{Binding MyItems}" ItemDisplayBinding="{Binding MyItemName}"></Picker>
Most helpful comment
To clarify, what you are expecting is that if the
Pickeris using theItemDisplayBindingproperty, when that property changes on the underlying item the update display value should be reflected in the Picker.That's not currently supported, but it would be nice. I'm adding it to our enhancements list.
This issue title is misleading; this doesn't have anything to do with two-way binding, it's just that the Picker does not monitor individual item property changes.