ListView OnScroll event using Xamarin forms

I have a listView, and when you receive a message, the listview should only scroll to the end if it's already at the end.

To be clear, if the user sees an old message, the list should not automatically scroll to the end, but if he is already on the list when receiving the message, the list should automatically scroll to the end.

So I have to get the actual position of the ListView, I haven't seen any properties or methods similar to this position in the API.

So I was thinking if it is possible to override an event like OnScroll so I can keep the current position of the ListView without using custom rendering.

Can this be done with XamarinForms?

+3


source to share


1 answer


ListView

does not fire Scrolled

events such as ScrollView

, but it does fire ItemAppearing

and ItemDisappearing

which you can use to keep track of which items are currently visible.



+1


source







All Articles