e.CenterItemIndex turns to 0, each time group is change (OS)

109 Views Asked by At

I am using Scrolled event in collectionView for iOS. If CollectionView contains groups, e.CenterItemIndex turns to 0 each time group is changing. Is there any way i can fix this?

private void CollectionViewtems_Scrolled(object sender, ItemsViewScrolledEventArgs e)
{
    var centerItemIndex=e.CenterItemIndex;
}

On iOs: When a group of collectionView will change it starts from 0 again; Example while Scrolling on iOS:

Index is 0
Index is 1
Index is 2
Index is 3
Index is 4
Index is 5  //After that index group will change 
Index is 0
Index is 1
Index is 2 //And after that index group will change again
Index is 0
Index is 1
Index is 2
Index is 3
Index is 4

In other hand on Android index will have a continous increment

Index is 0
Index is 1
Index is 2
Index is 3
Index is 4
Index is 5  //After that index group will change 
Index is 6
Index is 7
Index is 8 //And after that index group will change again
Index is 9
Index is 10
Index is 11
Index is 12
Index is 13
0

There are 0 best solutions below