-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Items vs ItemsSource #7553
Comments
Having only a single That said, I've seen other discussions where this is likely going to change:
|
Yeah this is something I decided to do back at the beginning of the project when I didn't expect anyone to be using it ;) In hindsight it was a mistake, not just because of porting issues, but also for performance reasons. Unfortunately changing the name of the property at this point would break pretty much everyone who uses Avalonia. One solution might be to add |
If that means "do it now or never" then my vote is change it now. I think there are enough cases you have discovered to justify it. It also helps the compatibility story as mentioned here. |
If it's hurting performance, then I'm...hesitantly in agreement with @robloo on this. Not going to pretend I see the whole picture though...but does anyone, really? |
I think even though its called avalonia if they made the same name of the properties then people wouldn't have to ask so many new questions about stuff. |
@kekekeks asked me in chat "how exactly is the In WPF, there are two items container properties, with only one of them being settable at any time:
In Avalonia the The thing that hurts performance is the fact that inline items need to be part of the logical tree even before the <TabControl>
<TabItem Header="Empty/>
<TabItem Header="Items">
<ListBox>
<ListBoxItem/>
</ListBox>
</TabItem>
</TabControl> When the "Empty" tab is open here, the What this means is that every time an item is added to If we had a separate |
I've looked into doing this, but I think we need to do #9944 first, as that's going to affect how this is implemented. |
Hi!
I would like to ask can you consider naming of some properties to match their more common use cases in WPF.
An example for this is Items vs ItemsSource.
In my humble opinion, it would make more sense to have your Items property named ItemsSource simply because the way one uses it in binding more closely resembles how one uses ItemsSource in WPF. Normalizations like this to existing XAML standards might make it easier for people to port apps from WPF to Avalonia, especially with the prospect of automating such transitions where possible (and it seems to be possible for a lot of layout related stuff).
I am unaware if there is a specific reason why this isn't the case and if it was brought up somewhere, can you please direct me to it so I can read?
Thank you!
Andrej
The text was updated successfully, but these errors were encountered: