From 17ee363eb4f09a75cbbc2086f73636d007744a69 Mon Sep 17 00:00:00 2001 From: "E.Z. Hart" Date: Tue, 12 Jan 2021 10:57:31 -0700 Subject: [PATCH] Remove unnecessary edge inset for vertically scrolling groups; Fixes #13347 --- .../GroupingGalleries/GridGrouping.xaml | 2 +- .../CollectionView/GroupableItemsViewController.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/GroupingGalleries/GridGrouping.xaml b/Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/GroupingGalleries/GridGrouping.xaml index aee06400441..f30d1c16aae 100644 --- a/Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/GroupingGalleries/GridGrouping.xaml +++ b/Xamarin.Forms.Controls/GalleryPages/CollectionViewGalleries/GroupingGalleries/GridGrouping.xaml @@ -9,7 +9,7 @@ - + diff --git a/Xamarin.Forms.Platform.iOS/CollectionView/GroupableItemsViewController.cs b/Xamarin.Forms.Platform.iOS/CollectionView/GroupableItemsViewController.cs index 752700fc3dd..9e8c6703433 100644 --- a/Xamarin.Forms.Platform.iOS/CollectionView/GroupableItemsViewController.cs +++ b/Xamarin.Forms.Platform.iOS/CollectionView/GroupableItemsViewController.cs @@ -226,15 +226,15 @@ internal UIEdgeInsets GetInsetForSection(ItemsViewLayout itemsViewLayout, if (itemsLayout is GridItemsLayout) { - nfloat itemSpacing = itemsViewLayout.GetMinimumInteritemSpacingForSection(collectionView, itemsViewLayout, section); - if (scrollDirection == UICollectionViewScrollDirection.Horizontal) { - return new UIEdgeInsets(itemSpacing + uIEdgeInsets.Top, lineSpacing + uIEdgeInsets.Left, + nfloat itemSpacing = itemsViewLayout.GetMinimumInteritemSpacingForSection(collectionView, itemsViewLayout, section); + + return new UIEdgeInsets(uIEdgeInsets.Top, itemSpacing + uIEdgeInsets.Left, uIEdgeInsets.Bottom, uIEdgeInsets.Right); } - return new UIEdgeInsets(lineSpacing + uIEdgeInsets.Top, itemSpacing + uIEdgeInsets.Left, + return new UIEdgeInsets(lineSpacing + uIEdgeInsets.Top, uIEdgeInsets.Left, uIEdgeInsets.Bottom, uIEdgeInsets.Right); }