-
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
Nested ItemsRepeater issues #5
Comments
Nested ItemsRepeater doesn't look like a correct design. I also don't think it will work with virtualization, so you probably should disable it on StackLayout. I would use mixed items in the source like Better solution might be creating Layout, that knows about headers, and will arrange headers and items correctly. Not sure how easy it is, and if it's even possible, but it will allow setting up custom layout placement for headers and items (important for grid-like layouts). |
Nesting |
@jp2masa interesting, I hope it's really supported by design. |
Nesting ItemsRepeater MUST be supported for future "ItemsRepeater as ItemsPresenter" Avalonia plans. Nesting arbitrary controls is also a pretty fundamental XAML concept. That said, I've seen nothing but issues with the edge cases using ItemsRepeater. I'm not even sure the fundamental design works in all theoretical edge cases. However, it seems like it should and it came from some smart minds at Microsoft. I guess it just doesn't have the mileage yet to have solved all the problems. |
Describe the bug
When nesting ItemsRepeaters, a couple things...
1- When scrolling, primarily with the scrollbar thumb, the garbage collector runs almost constantly. I can't tell if this occurs in WinUI since that mostly lives in native memory
2- When scrolling, especially large jumps quickly, the scrollviewer will freeze. Resizing a parent container (like the window) will fix it. I think this is related to the items of different height issue, but I haven't seen any reports of freezing yet. I also can't replicate this in WinUI, I can get choppy scrolling but it never fully freezes. Sometimes it takes aggressive scrolling to cause this (like in the video I attached), and sometimes one large quick scroll will do it.
(see attached video for demo of 1 & 2)
3- There may or may not be a memory leak. I do think this also occurs upstream in WinUI, as process memory slowly climbs when scrolling.
When first loaded, 10 ListBoxItems are present
Scroll up and down the list once: 179 ListBoxItems are present
Scroll randomly: 301
Scrolling some more: 438
To Reproduce
Example code:
Group installed fonts alphabetically and display using nested ItemsRepeaters
Window Content:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
https://user-images.githubusercontent.com/40413319/111887602-0ebf6c00-89a4-11eb-80c9-889c42d62ce5.mp4
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: