Hi
I would like to make sure that the selected item is alsways in the middle.
To achieve this in the CarouselSelectionChanged event handler I used the
XamCarouselPanelCommands
.NavigateToNextItem and
.NavigateToPreviousItem commands.
The problem:
In the carousel loaded event handler I make the first item (indexed 0) selected.
carousel.SelectedIndex = 0;
Then I scroll the carousel to previous item 4 times (since I have 9 items per page, and I basicaly need to bring the selected item 0 to center). I do the following:
{panel.ExecuteCommand(
XamCarouselPanelCommands.NavigateToPreviousItem);}
But those lines make no effect. The selected index 0 is still at the left side of the carousel.
How can I make this work?
Thank you
Hello,
If you need to scroll the items when they are loaded, you have to turn off the transition animation
You can do that like this:
xamCarouselListBox1.ViewSettings.ShouldScrollItemsIntoInitialPosition = false;
Let me know if that is what you are looking for.