From b4a46d482f4b511de7e829f1cfe16aa81057560a Mon Sep 17 00:00:00 2001 From: adrianknight89 Date: Tue, 25 Oct 2016 12:07:57 -0500 Subject: ScrollView should account for Content margin (#392) * ScrollView should account for Content margin * Unit tests for content margin --- Xamarin.Forms.Core/ScrollView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Xamarin.Forms.Core/ScrollView.cs') diff --git a/Xamarin.Forms.Core/ScrollView.cs b/Xamarin.Forms.Core/ScrollView.cs index 13ae6ad9..2c1f070d 100644 --- a/Xamarin.Forms.Core/ScrollView.cs +++ b/Xamarin.Forms.Core/ScrollView.cs @@ -268,7 +268,7 @@ namespace Xamarin.Forms double GetMaxHeight(double height) { - return Math.Max(height, _content.Bounds.Bottom + Padding.Bottom); + return Math.Max(height, _content.Bounds.Top + Padding.Top + _content.Bounds.Bottom + Padding.Bottom); } static double GetMaxHeight(double height, SizeRequest size) @@ -278,7 +278,7 @@ namespace Xamarin.Forms double GetMaxWidth(double width) { - return Math.Max(width, _content.Bounds.Right + Padding.Right); + return Math.Max(width, _content.Bounds.Left + Padding.Left + _content.Bounds.Right + Padding.Right); } static double GetMaxWidth(double width, SizeRequest size) -- cgit v1.2.3