Hi,
I am binding an ObservableCollection ViewModels to my XamCarouselListBox. I can see my items created - each one using the DataTemplate I have provided.
However, I cannot get the SelectedItem to work. I was hoping to obtain the viewModel in the SelectedItem that is bound to a property on the Parent ViewModel. However, when selecting an item in the Carousel, the SelectedItem template is applied (ie, a grey border around the item) but the ViewModel property (that is bound to the SelectedItem property on the Carousel) does not fire.
This means I am never informed as to which item is currently selected.
I have attached a dummy sample with some dummy objects. Can you please investigate? I'm probably missing something obvious!
Thanks,
Russell
Hello Russell,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Yes - this has solved my issue. I had (incorrectly) assumed that the two-way binding mode would have been applied by default. I had already thought about the binding mode, but dismissed it as it was too obvious!
As it is, despite the two-way binding mode fixing the selected item problem, we discovered that the XamCarouselListBox seems to lock up the UI thread and hang our application as we make rapid selections in our XamGrid that constantly updates the selectedItem on our viewModel (which the XamCarouselListBox is bound to). Unfortunately, we cannot see any exceptions, nor can we see an obvious culprits in our thread list - and because of time constraints, we have had to simply swap out the Carousel for a standard ListView, which has fixed the problem. I hope to revert this change, use the Carousel again and get to the root of the problem in due course.
Regards,