Why does ItemsSource require IList to support INotifyCollectionChanged? #20240
Unanswered
DanTravison
asked this question in
Q&A
Replies: 1 comment
-
|
This was discussed in #8764 In short, it wasn't technically feasible until items source was refactored. Currently, it's just not implemented and untested scenario. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Perhaps this has been answered before but...
Why does binding to ListBox.ItemsSource require the bound collection to implement IList to enable INotifyCollectionChanged?
In other word, I would expect a type that implements IReadOnlyList, INotifyPropertyChanged, and INotifyCollectionChanged to be a valid ItemSource. Is there a path where ItemsSource needs to be writeable by the ItemsControl?
I see this same issue with Maui and ended up having to implement IList explicitly and throw NotSupportedException for all IList methods that update the list.
To phrase this as a feature request: ItemsSource should support read-only collections/lists that implement INotifyCollectionChanged.
Beta Was this translation helpful? Give feedback.
All reactions