xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.63k stars 1.88k forks source link

[Bug] CollectionView adds extra white space at the end of the scroll if we use VerticalItemSpacing on the ItemsLayout #10505

Open hyper-venom opened 4 years ago

hyper-venom commented 4 years ago

Description

If we specify vertical item space for the collectionview, it will add additional white space at the end of items rendered by the collectionview. And the amount of white space is proportional to the no of items in the collection views itemsource.

Steps to Reproduce

  1. Add a collection view to the page
  2. Define VerticalItemSpacing for the layout, say GridItemsLayout
  3. Set ItemsSource

More the no of the item in the collection view, more the white space at the end.

Expected Behavior

VerticalItemSpacing should only add spacing among the items present in the collection

Actual Behavior

Additional white space is added after rendering the ItemsSource items, as the no of items increase the amount of white space at the end also increases.

Basic Information

Simulator Screen Shot - iPhone 11 - 2020-04-29 at 15 33 19

Workaround

One workaround was to not use the VerticalItemSpacing and instead include the vertical spacing within the data template. But the downfall of this approach is that if we wont be able to have a common template being used in different places

hugotruffe79 commented 2 years ago

Hi I have the same problem.

The project has the last version of xamarin