-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Make ItemsControl.Items readonly. #10827
Conversation
7388767
to
060e290
Compare
Definitely need a clearer error message here. @kekekeks do you think we need to special-case this in the xaml compiler (and is this behaviour even correct?) |
Maybe we can special-case this as a warning instead of error? |
I'm not sure that adding a |
How about some axaml playgrounds/galleries that want to demonstrate the result of binding a |
|
Issue created #10946 |
What does the pull request do?
#10590 added the
ItemsControls.ItemsSource
property to make our controls more like WPF and UWP, but left in a setter for theItemsControl.Items
property for compatibility reasons.From the discussion in that PR and with customers we decided that it's acceptable to remove this setter and make
ItemsControl.Items
read-only. This will mean that clients will have to change any code that binds/setsItems
to useItemsSource
when upgrading to Avalonia 11.This PR also reverts the change to
InheritDataTypeFromItems
in #10590, meaning that it's only legal to apply a single one of these attributes to a property again.Breaking changes
ItemsControl.Items
is now readonly.