Hi Team,
I am using the CollectionView with Xamarin.Forms (4.1.0.483098-pre1) package. Facing an issue "Extra spacing was added at the bottom of the colletionview when the row-height is set to 'Auto' in its parent grid".
Below is the code I use
<ContentPage.Content> <ScrollView BackgroundColor="Brown"> <Grid BackgroundColor="Red" RowSpacing="0" Padding="0" ColumnSpacing="0"> <Grid.RowDefinitions> <RowDefinition Height="Auto"></RowDefinition> <RowDefinition Height="*"></RowDefinition> </Grid.RowDefinitions> <CollectionView ItemsSource="{Binding Categories}" Grid.Row="0" BackgroundColor="MistyRose"> <CollectionView.ItemsLayout> <GridItemsLayout Span="2" Orientation="Vertical"></GridItemsLayout> </CollectionView.ItemsLayout> <CollectionView.ItemTemplate> <DataTemplate> <StackLayout Orientation="Vertical" BackgroundColor="Yellow" Padding="12"> <Image Source="{Binding ImagePath}" Aspect="Fill" WidthRequest="160" HeightRequest="150"></Image> <Label Text="{Binding ImageName}" FontSize="14" FontAttributes="None" TextColor="Black"></Label> </StackLayout> </DataTemplate> </CollectionView.ItemTemplate> </CollectionView> <Label Text="Home" TextColor="Blue" Grid.Row="1" VerticalOptions="Start" VerticalTextAlignment="Start" BackgroundColor="Green"></Label> </Grid> </ScrollView> </ContentPage.Content>
The grid clearly has 2 rows and there is a space added between the rows without specifying any properties for that spacing. I haven't checked in UWP and iOS. I cannot post the screenshots because of the restriction "You have to be around for a little while longer before you can post links."