Linear Arrangement in .NET MAUI Carousel View (SfCarousel)
4 May 20251 minute to read
The Carousel items can be populated in the view in a stacked linear layout by setting the ViewMode property to Linear. The present option is Default.
<carousel:SfCarousel x:Name="carousel"
ItemsSource="{Binding ImageCollection}"
ItemTemplate="{StaticResource itemTemplate}"
ViewMode="Linear"/>
SfCarousel carousel = new SfCarousel();
carousel.ViewMode = ViewMode.Linear;
carousel.ItemTemplate = itemTemplate;
carousel.SetBinding(SfCarousel.ItemsSourceProperty, "ImageCollection");