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

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


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


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

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 2.2.0.45
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