Hello,
I'm using the WPF Carousel in my application and bind the ItemsSource und SelectedItem properties. But when the carousel is loaded, the SelectedItem is not the one the carousel shows in front of it. I've looked at the SelectedItem property in the Loaded event and it was set correctly. I've tried many different ways to achive this:
foreach (CarouselItem item in carousel.Panel.Children)
{
if (item.Item == carousel.SelectedItem)
{
item.BringIntoView();
}
}
carousel.SetIsSelected(carousel.SelectedItem, true);
carousel.SetIsCurrent(carousel.SelectedItem, true);
this.carousel.BringDataItemIntoView(carousel.SelectedItem);
carousel.CurrentItem = carousel.SelectedItem;
But none of them worked. How can I achieve it?
I'm using the WPF Carousel in my application and bind the ItemsSource und SelectedItem properties. But when the carousel is loaded, the SelectedItem is not the one the carousel shows in front of it. I've looked at the SelectedItem property in the Loaded event and it was set correctly. I've tried many different ways to achive this:
foreach (CarouselItem item in carousel.Panel.Children)
{
if (item.Item == carousel.SelectedItem)
{
item.BringIntoView();
}
}
carousel.SetIsSelected(carousel.SelectedItem, true);
carousel.SetIsCurrent(carousel.SelectedItem, true);
this.carousel.BringDataItemIntoView(carousel.SelectedItem);
carousel.CurrentItem = carousel.SelectedItem;
But none of them worked. How can I achieve it?