Forum Xamarin Xamarin.Forms

CarouselView control is not displaying correct position.

I am using CarouselView control in my application for displaying details related to various topics. Design is in such a way that on first screen list of topics will be displayed to user. On tapping on desired topic, user will be navigated to next screen in which details for tapped topic will be displayed. The details in this details screen is displayed inside a CarouselView which will enable users to swipe between different topic details, i.e., this details screen contains list of all topics (and their details) which are set as items source for the CarouselView control.
While navigating to details screen, I am passing the index of topic tapped by user and need to display that particular topic to user. I have bound an integer type property to CarouselView's "Position" property. But in place of displaying the topic present at that index, CarouselView displays the first topic details only at all times.
Even though while debugging the CarouselView's position property returns the selected index value, on screen only the first topic details is displayed.
It appears as such the display is stuck to first item in items source list.

As a work around I tried a for loop which changes the position of CarouselView from 0 till it reaches selected index. But in this case the displayed position is either one less than the selected index or one more than selected index (counter +1 used to prevent previous scenario).

Requesting anyone with higher insight over CarouselView control to provide suggestions on this behaviour.

Sign In or Register to comment.