Bug 41418 - Margin inside ScrollView not working properly
Summary: Margin inside ScrollView not working properly
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms (show other bugs)
Version: 2.2.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-06-01 03:09 UTC by Dominik Weber
Modified: 2016-10-25 17:10 UTC (History)
5 users (show)

See Also:
Tags: Windows iOS ac
Is this bug a regression?: ---
Last known good build:

test project (216.12 KB, application/x-zip-compressed)
2016-06-01 03:09 UTC, Dominik Weber

Description Dominik Weber 2016-06-01 03:09:01 UTC
Created attachment 16149 [details]
test project

When placing a view with margin inside a ScrollView the margins are not computed properly.

Try this code:

            MainPage = new ContentPage
                Content = new ScrollView()
                    Content = new BoxView
                        Margin = 100,
                        WidthRequest = 500,
                        HeightRequest = 800,
                        BackgroundColor = Color.Red

expected result: the whole screen area should be scrollable (if the window is small enough), the red box in the middle should have 100px margin on each side

actual result:
iOS: the bottom margin is missing
UWP: all margins are missing

Tested with XForms
Comment 1 adrianknight89 2016-09-29 06:00:58 UTC
See https://github.com/xamarin/Xamarin.Forms/pull/392
Comment 2 Rui Marinho 2016-10-25 17:10:26 UTC
Should be fixed in 2.3.4-pre1

Note You need to log in before you can comment on or make changes to this bug.