diff --git a/Billing.Shared/UI/GroupStackLayout.cs b/Billing.Shared/UI/GroupStackLayout.cs index ff6fb08..37bd0b7 100644 --- a/Billing.Shared/UI/GroupStackLayout.cs +++ b/Billing.Shared/UI/GroupStackLayout.cs @@ -122,8 +122,9 @@ namespace Billing.UI { return; } + var padding = Padding; var spacing = Spacing; - var lastHeight = 0d; + var lastHeight = padding.Top; var rowHeight = RowHeight; var groupHeight = GroupHeight; foreach (var item in Children) @@ -154,7 +155,7 @@ namespace Billing.UI { itemHeight = rowHeight; } - var rect = new Rectangle(0, lastHeight, width, itemHeight); + var rect = new Rectangle(padding.Left, lastHeight, width, itemHeight); //item.Layout(rect); LayoutChildIntoBoundingRegion(item, rect); lastHeight += itemHeight + spacing; @@ -185,7 +186,8 @@ namespace Billing.UI lastHeight += rowHeight + spacing; } } - lastSizeRequest = new SizeRequest(new Size(widthConstraint, lastHeight)); + var padding = Padding; + lastSizeRequest = new SizeRequest(new Size(widthConstraint, lastHeight + padding.Top + padding.Bottom)); return lastSizeRequest; } } diff --git a/Billing.Shared/Views/BillPage.xaml b/Billing.Shared/Views/BillPage.xaml index 2bf65b6..196ee5b 100644 --- a/Billing.Shared/Views/BillPage.xaml +++ b/Billing.Shared/Views/BillPage.xaml @@ -75,9 +75,9 @@ - + + Padding="0, 10, 0, 0" RowHeight="50"> (bills.Select(b => WrapBill(b))); RefreshBalance(Bills); + MainThread.BeginInvokeOnMainThread(async () => await scrollView.ScrollToAsync(0, 0, true)); }); }