Repository navigation
Labels
area-controls-collectionviewCollectionView, CarouselView, IndicatorViewCollectionView, CarouselView, IndicatorViewmigration-compatibilityXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-ConvertXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convertplatform/androids/needs-attentionIssue has more information and needs another lookIssue has more information and needs another looks/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Description
Description
I am using Maui 7.0.92 on Android (Emulator and local device Galaxy S20FE)
My Viewlayout is the following:
ContentPage
RefreshView
Grid (no further definitions in grid)
CollectionView
The Collection looks like this. If you add some items you will see the items snap on scrolling, although snapping is disabled...
<CollectionView Margin="5"
SelectionMode="None">
<CollectionView.ItemsLayout>
<LinearItemsLayout Orientation="Vertical"
ItemSpacing="5"
SnapPointsType="None"
SnapPointsAlignment="Center" />
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<Border Padding="0"
HeightRequest="100"
StrokeThickness="1">
<Border.StrokeShape>
<Rectangle RadiusX="30"
RadiusY="30" />
</Border.StrokeShape>
<Border.Shadow>
<Shadow Opacity="0.1" />
</Border.Shadow>
</Border>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
7.0.92
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android, iOs is not affected
Affected platform versions
Android emulator and local device (API 33)
Did you find any workaround?
no
Relevant log output
No response
Reacted by DM, kklose23 and dainius-r
Metadata
Metadata
Assignees
Labels
area-controls-collectionviewCollectionView, CarouselView, IndicatorViewCollectionView, CarouselView, IndicatorViewmigration-compatibilityXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-ConvertXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convertplatform/androids/needs-attentionIssue has more information and needs another lookIssue has more information and needs another looks/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Activity
Raffro commentedon Oct 30, 2023
EDIT: It seems that it only happen if the top element of the datatemplate is a border.
if i put a grid or a stacklayout it doesnt happen.
But if a border again is the first element in the stack or grid, it snaps again without that i define it.
If the collectionview is put into a scrollview,, it doesn't auto snap anymore, but with scrollview, it scrolls laggy
[-]CollecitionView snaps on scroll although snapping is disabled[/-][+]CollectionView snaps on scroll although snapping is disabled[/+]mjsb212 commentedon Nov 3, 2023
I'm having a similar issue when using the GridItemsLayout tags in XAML - BUT if I remove the CollectionView.ItemsLayout and just use
<CollectionView ItemsLayout="VerticalGrid, 3" />which renders the same exact grid layout, there is no snapping issue on scroll. The following XAML is what causes my snapping issue:<CollectionView.ItemsLayout> <GridItemsLayout Orientation="Vertical" VerticalItemSpacing="5" HorizontalItemSpacing="5" SnapPointsType="None" Span="3"/> </CollectionView.ItemsLayout>Raffro commentedon Nov 8, 2023
Hi, here is a simple project attached, where you can add elements to the collectionview per button click. you will see on android (e.g. API 33) that it snaps on scroll.
@mjsb212 Thank you, your hint helped me a lot, I am using now
<CollectionView ItemsLayout="VerticalList"/>and it works without snapping. Unfortunately I can not specify the itemspacing with that type of declaration. If I set the Itemspacing in the code-behind file via((LinearItemsLayout)collV.ItemsLayout).ItemSpacing = 15;it is snapping again.
Using the xaml declaration without ItemSpacing also prevents the snapping, so I assume the bug lies within the setting of the ItemSpacing Property. @mjsb212 FYI
CollectionViewSnapTest.zip
mjsb212 commentedon Nov 10, 2023
@Raffro I have also determined that setting the ItemSpacing property is what causes the "snapping" behavior - so the only workaround for now is to not set it until the bug is logged and fixed.
4 remaining items
osyyyS commentedon Dec 6, 2025
Still occurs in .NET 10 SR1 on Android Emulator API36 with VS2026
Lucasian20 commentedon Jan 31, 2026
Yep still has poor scrolling performance on android in .net10
[Android] Fix SpacingItemDecoration to only add spacing between items
[Android] SpacingItemDecoration improvement
[Android] CollectionView: Fix item spacing applied on outer edges cau…
[Android] CollectionView: Fix item spacing applied on outer edges cau…
[Android] CollectionView: Fix item spacing applied on outer edges cau…
[Android] CollectionView: Fix item spacing applied on outer edges cau…
[Android] CollectionView: Fix item spacing applied on outer edges cau…
March 30th, Inflight Candidate (#34617)