Reputation: 1494
Only items in first row shows different size then other items. However I set same size to all items in XAML. It only happens on Android.
<CollectionView
HorizontalOptions="FillAndExpand"
HeightRequest="100"
ItemsSource="{Binding Items}"
SelectionMode="Single">
<CollectionView.ItemsLayout>
<GridItemsLayout
Orientation="Vertical"
Span="4"
HorizontalItemSpacing="10"
VerticalItemSpacing="10"/>
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<StackLayout>
<Image
WidthRequest="50"
HeightRequest="50"
Source="{local:ImageResource CollectionView.Image.png}"/>
<Label
Text="{Binding Title}"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center" />
</StackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
Upvotes: 0
Views: 519
Reputation: 10346
I download your sample to test, I can not run your sample, I create new project and upload one sample, you can take a look:
https://github.com/CherryBu/collectionsample1
This is the screenshot:
Upvotes: 1