CarouselView is a view for presenting data in a scrollable layout, where users can swipe to move through a collection of items.
CarouselView is populated with data by setting its
ItemsSource property to any collection that implements
IEnumerable. The appearance of each item can be defined by setting the
ItemTemplate property to a
By default, a
CarouselView will display its items in a horizontal list. However, it also has access to the same layouts as CollectionView, including a vertical orientation.
The currently displayed item in a
CarouselView can be accessed through the
CarouselView, an empty view can be specified that provides feedback to the user when no data is available for display. The empty view can be a string, a view, or multiple views.
When a user swipes to initiate a scroll, the end position of the scroll can be controlled so that items are fully displayed. In addition,
CarouselView defines two
ScrollTo methods, that programmatically scroll items into view. One of the overloads scrolls the item at the specified index into view, while the other scrolls the specified item into view.