We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Issue when adding SfCarouselItem to the ItemsSource observable collection during runtime

I am building an SfCarousel in my xaml of my PCL project with the ItemsSource binding set to an ObservableCollection<SfCarouselItem>() instance. In my constructor I have added multiple SfCarouseltem's containing a variation of item content. The carousel loads fine, but when I try to add onto this ObservableCollection with another SfCarouselItem during runtime (triggered by a button click on that page) I get an exception on my android project: 

     "System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection."

I have attempted this in separate projects with different content and receive the same exception. I believe this is specifically a SfCarouselItem issue as when I populate the ObservableCollection with View objects, there is no longer an issue and the View is added to the end of the carousel as the next item. 

Note: I have also ran the project using the deprecated "DataSource"and the issue will in fact go away. 

1 Reply

MS Mugundhan Saravanan Syncfusion Team January 11, 2019 09:09 AM UTC

Hi Trevor Christensen,

Greetings from Syncfusion.

We have validated the defect you have initiated with us. Thank you for taking the time to report this issue and helping us improve our product. This fix will be included in our upcoming Volume 4 Service Pack 1 release which is scheduled to be rolled out by first week of February 2019. You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link

Feedback: https://www.syncfusion.com/feedback/4239

If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal link above.

Mugundhan S.

Live Chat Icon For mobile
Up arrow icon