-
Notifications
You must be signed in to change notification settings - Fork 1
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
ScrollViewer or ItemsRepeater does not render items added to the top #28
Comments
FYI: ItemsRepeater is being deprecated soonish. It is however still somewhat supported right now. https://github.com/AvaloniaUI/Avalonia.Controls.ItemsRepeater |
I wasn't aware that the |
It's not yet. It will be sometime after 12.0 releases though (no idea when that is). I will say you should still avoid using it for new developments though. But fixes and bug reports are technically still being accepted for it.
Do you have virtualisation enabled? The majority of ItemsRepeater panels are virtualised. ItemsControl however is not virtualised by default. If you change |
Thank you very much for that hint. This replaces the ItemsRepeater completely - at least for me:
|
Glad I could help |
Describe the bug
I have this:
The
MyItemList
is an ObservableCollection.When I add a new Item to the Top of the list via
MyItemList.Insert(0, ...)
and run athis.RaisePropertyChanged(nameof(MyItemList));
, the space of the new item in theItemsRepeater
is used but the item itself is not rendered. This does not happen from the very beginning but after some (not so long) time. I think shortly after when the first items runs out of the visible part of the Window.If I scroll just a pixel in the
ScrollViewer
, everything is where and how it should be immediately.This does not happen, if the
ScrollViewer
is not involved.This is how it looks like:
To Reproduce
Create a new Avalonia Project from scratch with Desktop enabled. Leave everything else at default.
Make the following changes:
Avalonia.ItemsRepeater
Nuget to the main projectMainViewModel.cs
with this:MyModel.cs
with the following content:I create a sample project with the things above:
ScrollViewerRenderIssue.zip
Expected behavior
Also later added items are rendered as the first items that were added.
Avalonia version
11.1.4
OS
Windows
Additional context
No response
The text was updated successfully, but these errors were encountered: