Welcome to the WPF feedback portal. We’re happy you’re here! If you have feedback on how to improve the WPF, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
When binding the SelectedItem of the Carousel control, if the selected item property is changed from code behind it normally works. But when an item is selected after the collection is changed, the carousel items rotates and stops on the wrong item.
I am going to attach an example program to this feedback in order for you to see the problem.
As you can see, the SelectedItem property of the Carousel is bounded (Mode: Two-Way) to the SelectedMenuOption property of the ViewModel. When a new item is selected from code behind (clicking one of the buttons at the bottom of the screens), the SelectedItem property of the ViewModel is changed and so does the text displayed in the TextBlock and the selected item of the Carousel.
The problem comes when the collection changes (clicking the "A/B" button). The ItemsSource property of the Carousel gets updated and I want the element with the same index to be already selected after the change. It works but not if the last element is selected.
In the attached example, if I select the element "6A" and then I click the button "A/B". The collection is updated, the SelectedItem property is set to "6B" but the Carousel displays "2B".