From 3f33b4bab0272790fd9a242460c3694938f24afc Mon Sep 17 00:00:00 2001 From: Mantas Pilipuitis Date: Sat, 9 Oct 2021 18:47:04 +0300 Subject: [PATCH] Fix scroll height in a hacky way. Open issue: https://github.com/xamarin/Xamarin.Forms/issues/6451 --- Wasted/Pages/FoodPlacePage.xaml.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Wasted/Pages/FoodPlacePage.xaml.cs b/Wasted/Pages/FoodPlacePage.xaml.cs index 74dd975..b8f7937 100644 --- a/Wasted/Pages/FoodPlacePage.xaml.cs +++ b/Wasted/Pages/FoodPlacePage.xaml.cs @@ -34,6 +34,9 @@ public void InitializeViews() { contentScrollView.BindingContext = SelectedFoodPlace; dealsCollectionView.ItemsSource = SelectedFoodPlace.Deals; + + const int dealHeight = 220; + dealsCollectionView.HeightRequest = dealHeight * ((SelectedFoodPlace.Deals.Count + 1) / 2); //Two items in one row } ///