Deleting items in CarouselView

EJ 366 Reputation points
2021-05-07T06:24:04.593+00:00

Hi,

I've a CarouselView in which I only want to have 3 items at a time, so when 4th item is added I want to delete first one and so on. This is for email app as each email can be big in size so don't want to hold many items in CarouselView.

The way I'm doing this is by using CurrentItemChanged event to add next email when user scrolls to last one. If item count exceeds 3 then I delete first one. All works fine, except when I delete the first item scroll animation stops. I guess this happens because CurrentItemChanged is raised before item is fully snapped into position?

My question is how can I avoid this? Is there an event when item changed and scrolling is completely stopped?

Thanks in advance.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,298 questions
{count} votes