diff options
author | adrianknight89 <adrianknight89@outlook.com> | 2016-10-25 12:07:57 -0500 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-10-25 18:07:57 +0100 |
commit | b4a46d482f4b511de7e829f1cfe16aa81057560a (patch) | |
tree | 6d3323d136f973b41e3c9f555adf6f1c60afec71 /Xamarin.Forms.Core | |
parent | 6196407f8924463e526bc96f6855560954d9d2e0 (diff) | |
download | xamarin-forms-b4a46d482f4b511de7e829f1cfe16aa81057560a.tar.gz xamarin-forms-b4a46d482f4b511de7e829f1cfe16aa81057560a.tar.bz2 xamarin-forms-b4a46d482f4b511de7e829f1cfe16aa81057560a.zip |
ScrollView should account for Content margin (#392)
* ScrollView should account for Content margin
* Unit tests for content margin
Diffstat (limited to 'Xamarin.Forms.Core')
-rw-r--r-- | Xamarin.Forms.Core/ScrollView.cs | 4 |
1 files changed, 2 insertions, 2 deletions
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) |