Skip to content

Items are stuck to the CollectionView when there is ItemSpacing #8422

@hprez21

Description

@hprez21

Description

The items are stuck to the sides of the CollectionView, preventing to see the other items when there is an assignment to ItemSpacing.

Steps to Reproduce

1.- Create a new .NET MAUI project.
2.- Remove the default code.
3.- In the xaml file:

<CollectionView>
        <CollectionView.ItemsLayout>
            <LinearItemsLayout ItemSpacing="50" Orientation="Horizontal" />
        </CollectionView.ItemsLayout>
        <CollectionView.ItemsSource>
            <x:Array Type="{x:Type x:String}">
                <x:String>mono</x:String>
                <x:String>monodroid</x:String>
                <x:String>monotouch</x:String>
                <x:String>monorail</x:String>
                <x:String>monodevelop</x:String>
                <x:String>monotone</x:String>
                <x:String>monopoly</x:String>
                <x:String>monomodal</x:String>
                <x:String>mononucleosis</x:String>
            </x:Array>
        </CollectionView.ItemsSource>
        <CollectionView.ItemTemplate>
            <DataTemplate>
                <Frame Margin="5">
                    <Label Text="{Binding .}" />
                </Frame>
            </DataTemplate>
        </CollectionView.ItemTemplate>
    </CollectionView>

Scroll the collection to the right, and view the problem..
wDN7mJrXEV

Version with bug

6.0.400 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 10

Did you find any workaround?

No.

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-collectionviewCollectionView, CarouselView, IndicatorViewpartner/cat 😻this is an issue that impacts one of our partners or a customer our advisory team is engaged withplatform/androids/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions