Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Remove unnecessary edge inset for vertically scrolling groups; Fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
hartez committed Jan 12, 2021
1 parent 626f756 commit 17ee363
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<CollectionView x:Name="CollectionView" IsGrouped="True" Header="This is a header" Footer="This is a footer.">

<CollectionView.ItemsLayout>
<GridItemsLayout Span="2" Orientation="Vertical"></GridItemsLayout>
<GridItemsLayout Span="2" HorizontalItemSpacing="5" Orientation="Vertical"></GridItemsLayout>
</CollectionView.ItemsLayout>

<CollectionView.ItemTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 17ee363

Please sign in to comment.