Open JMNewsome opened 4 years ago
The CarousselView itself is loosing it's scrollposition too! I have a CarouselView with 17 items (via binding) and set the CurrentItem to the 16th item -> works fine when initialising the view/page first
then: Navigate back and forth -> Now the carousselView shows the first item (position 0)
Strange thing: when debugging inside the OnAppearing of the page, the CarousselView has the correct properties set for "CurrenPosition" and "CurrentItem" - But it's not showing them.
Because of having the correct properties set, nothing seems to help to workaround that issue. i've tried to set CurrentItem again (and via binding the CurrentItem to send an OnPropertyChanged again) - same for CurrentPosition - same for calling ScrollTo ... It seems that the controls thinks it is already at the correct destination so it doesn't have to do anything... but it's switched to the first position - without giving an Event or anything :(
The CarousselView itself is loosing it's scrollposition too! I have a CarouselView with 17 items (via binding) and set the CurrentItem to the 16th item -> works fine when initialising the view/page first
then: Navigate back and forth -> Now the carousselView shows the first item (position 0)
Strange thing: when debugging inside the OnAppearing of the page, the CarousselView has the correct properties set for "CurrenPosition" and "CurrentItem" - But it's not showing them.
Because of having the correct properties set, nothing seems to help to workaround that issue. i've tried to set CurrentItem again (and via binding the CurrentItem to send an OnPropertyChanged again) - same for CurrentPosition - same for calling ScrollTo ... It seems that the controls thinks it is already at the correct destination so it doesn't have to do anything... but it's switched to the first position - without giving an Event or anything :(
Edit: Xamarin.Forms 4.6.0.726
The CarousselView itself is loosing it's scrollposition too! I have a CarouselView with 17 items (via binding) and set the CurrentItem to the 16th item -> works fine when initialising the view/page first
then: Navigate back and forth -> Now the carousselView shows the first item (position 0)
Strange thing: when debugging inside the OnAppearing of the page, the CarousselView has the correct properties set for "CurrenPosition" and "CurrentItem" - But it's not showing them.
Because of having the correct properties set, nothing seems to help to workaround that issue. i've tried to set CurrentItem again (and via binding the CurrentItem to send an OnPropertyChanged again) - same for CurrentPosition - same for calling ScrollTo ... It seems that the controls thinks it is already at the correct destination so it doesn't have to do anything... but it's switched to the first position - without giving an Event or anything :(
Edit: Xamarin.Forms 4.6.0.726
Edit: Xamarin.Forms 4.6.0.726
"fixed" with 4.6.0.772 - At least the last position is restored when pushing the page again But you can see (and have to wait) that this happens! It seems like the CarouselView is still switching to the first item and then "automagically" scrolling to the last selected item (with animation!)
I would expect the Page / CarouselView to look like i left it when i open the page again
I would have said that this is because the ViewPager OffscreenPageLimit is too small, but that doesn't seem to be the case:
We must be thwarting it somewhere.
Description
Steps to Reproduce
Expected Behavior
Position of the CollectioView offset should be what it was when it was navigated away from
Actual Behavior
Position of the CollectionView offset is reset back to 0
Basic Information
Screenshots
Reproduction Link
[Android] CollectionView inside CarouselPage losing position.zip
Workaround