Hi,
We are currently building a Carousel control by displaying file thumbnails and enable load to specific file content by clicking the selected thumbnail.
But unfortunately facing the issue of Carousel selectedItem type, it has different type inconsistently.
Below are the temporary code to handle the different type issue:
if (Carousel.SelectedItem != null)
{
File itemSelected = null;
if (Carousel.SelectedItem.GetType() == typeof(File))
{
itemSelected = (File)Carousel.SelectedItem;
}
else
{
itemSelected = (File)((CarouselItem)Carousel.SelectedItem).Content;
}
}
We can not figure out the reason of different type needed and causing different type since all the file are same.
Please advise, thank you.