You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 1, 2024. It is now read-only.
I load two dozen or so elements into an Observable Collection, which is bound to a Collection View. Some of the elements contain text, and other contain images. The initial scroll position for the Collection View, is at the top. When I manually scroll down (and up, and down again, and so on), everything looks nice and smooth all the time.
However, I need the initial scroll position to be at the bottom of the Collection View. To achieve this I'm using the Scroll-To method (scrolling to the last element with animations turned off), immediately after loading the elements into the Observable Collection. This achieves the desired effect; when the Collection View with loaded elements appears on screen, the initial position is at the bottom of the list.
The problem is that, when I now scroll up manually (especially past elements that contain images), the scrolling is very jumpy / non-smooth. The problem is only noticeable on the first pass scrolling through the list, i.e. if I scroll to the top (jumpy), and then back down (and up, and ...) the scrolling is nice and smooth again.
I don't understand what the Collection View is doing behind the scenes. I'm hoping somebody could explain to me why the scrolling looks smooth in the first case (initial position at the top), but not in the second (initial position at the bottom). And, hopefully, also suggest some way to resolve or evade the problem.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi.
I load two dozen or so elements into an Observable Collection, which is bound to a Collection View. Some of the elements contain text, and other contain images. The initial scroll position for the Collection View, is at the top. When I manually scroll down (and up, and down again, and so on), everything looks nice and smooth all the time.
However, I need the initial scroll position to be at the bottom of the Collection View. To achieve this I'm using the Scroll-To method (scrolling to the last element with animations turned off), immediately after loading the elements into the Observable Collection. This achieves the desired effect; when the Collection View with loaded elements appears on screen, the initial position is at the bottom of the list.
The problem is that, when I now scroll up manually (especially past elements that contain images), the scrolling is very jumpy / non-smooth. The problem is only noticeable on the first pass scrolling through the list, i.e. if I scroll to the top (jumpy), and then back down (and up, and ...) the scrolling is nice and smooth again.
I don't understand what the Collection View is doing behind the scenes. I'm hoping somebody could explain to me why the scrolling looks smooth in the first case (initial position at the top), but not in the second (initial position at the bottom). And, hopefully, also suggest some way to resolve or evade the problem.
I'm using Xamarin 5.0.x on iOS.
Beta Was this translation helpful? Give feedback.
All reactions