-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
In a brand-new .NET MAUI app using only MAUI controls (no CommunityToolkit, no custom renderers/handlers, no custom gestures), a vertical CarouselView configured with SnapPointsType="MandatorySingle" and SnapPointsAlignment="Center" no longer “snaps” on iOS in Microsoft.Maui.Controls v10.0.20.
- Expected: each vertical swipe settles/snaps to exactly one item (one card per screen), centered, preventing free/infinite scrolling.
- Actual (iOS): the vertical swipe scrolls freely (no snapping), as if snap points are ignored.
- Android: works as expected (snaps).
This works correctly with Microsoft.Maui.Controls v9.0.120 and regressed in v10.0.20.
| ### Microsoft.Maui.Controls v9.0.120 (Working) | ### Microsoft.Maui.Controls v10.0.20 (NOT working) |
|---|---|
![]() |
![]() |
Steps to Reproduce
- Create a new “.NET MAUI App” (default template).
- Ensure
Microsoft.Maui.Controlsversion is10.0.20. - Replace
MainPage.xamlwith:
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="MauiApp1.MainPage">
<Grid RowDefinitions="Auto,*" Padding="16" RowSpacing="12">
<Label x:Name="IndexLabel" Text="Index: 1 / 10" HorizontalOptions="Center" />
<CarouselView x:Name="Carousel"
Grid.Row="1"
ItemsSource="{Binding Cards}"
PositionChanged="Carousel_PositionChanged"
PeekAreaInsets="0">
<CarouselView.ItemsLayout>
<LinearItemsLayout Orientation="Vertical"
SnapPointsType="MandatorySingle"
SnapPointsAlignment="Center" />
</CarouselView.ItemsLayout>
<CarouselView.ItemTemplate>
<DataTemplate>
<Border StrokeThickness="1" Stroke="Black" StrokeShape="RoundRectangle 16">
<Grid Padding="24">
<Label Text="{Binding}" FontSize="36" HorizontalOptions="Center" VerticalOptions="Center" />
</Grid>
</Border>
</DataTemplate>
</CarouselView.ItemTemplate>
</CarouselView>
</Grid>
</ContentPage>- Replace
MainPage.xaml.cswith:
namespace MauiApp1;
public partial class MainPage : ContentPage
{
public IReadOnlyList<string> Cards { get; } = Enumerable.Range(1, 10).Select(i => $"Card {i}").ToList();
public MainPage()
{
InitializeComponent();
BindingContext = this;
UpdateIndex(0);
}
void Carousel_PositionChanged(object sender, PositionChangedEventArgs e) => UpdateIndex(e.CurrentPosition);
void UpdateIndex(int position) => IndexLabel.Text = $"Index: {position + 1} / {Cards.Count}";
}- Run on iOS simulator/device and swipe vertically.
Expected outcome: after each swipe, the carousel snaps/settles to a single item (one card per screen), centered.
Actual outcome (iOS on 10.0.20): scrolling remains free (no snapping); snap points appear ignored.
Control check: change Microsoft.Maui.Controls to 9.0.120 → snapping works again.
Link to public reproduction project repository
https://github.com/Kapusch/MAUI_CarouselView_Issue_33308/tree/master
Version with bug
10.0.20
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
9.0.120 SR12
Affected platforms
iOS
Affected platform versions
iPhone 17, iOS 26.1
Did you find any workaround?
Yes, this has worked after reverting back to the .NET 9 handler:
#if IOS || MACCATALYST
builder.ConfigureMauiHandlers(handlers =>
{
handlers.AddHandler<
Microsoft.Maui.Controls.CarouselView,
Microsoft.Maui.Controls.Handlers.Items.CarouselViewHandler
>();
});
#endifcf: documentation
Relevant log output
N/A (no relevant logs observed)Metadata
Metadata
Assignees
Labels
Type
Projects
Status

