Bug 43427 - [iOS] Margins Set on ListView Header and Footer Are Rendered Incorrectly
Summary: [iOS] Margins Set on ListView Header and Footer Are Rendered Incorrectly
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.3.5
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-08-16 18:10 UTC by Jimmy [MSFT]
Modified: 2017-08-15 23:06 UTC (History)
5 users (show)

Tags: ac ios listview header footer margin
Is this bug a regression?: ---
Last known good build:

repro solution (285.30 KB, application/x-zip-compressed)
2016-08-16 18:10 UTC, Jimmy [MSFT]

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 for Bug 43427 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Jimmy [MSFT] 2016-08-16 18:10:45 UTC
Created attachment 17053 [details]
repro solution

### Overview
On iOS, the Header and Footer of a ListView do not properly set their given margins when rendered. The right margin seems to be applied as additional padding and the top margin is ignored. The  Header also ignores any left margin. 

### Steps to Reproduce
1. Run the iOS project in the attached repro solution

### Expected Results
The Footer and Header will have identical margins as the list items.

### Actual Results
The Header and Footer margins are incorrect.

### Testing Info
Tested with Forms and
Comment 1 adrianknight89 2016-10-21 16:26:22 UTC
Referencing https://bugzilla.xamarin.com/show_bug.cgi?id=41869
Comment 2 Paul Brenner 2017-07-30 18:34:00 UTC
Just hit this one. Is there an update or workaround for this almost 1 year old bug?
Comment 3 Jimmy [MSFT] 2017-08-15 23:06:01 UTC
This is still an issue in recent Xamarin.Forms builds. 

### Workaround
Wrap your desired layout in an additional StackLayout, e.g.:

        <ContentView x:Name="MainLayout" Margin="5">
                <Label Text="Footer Label" />

### Version Tests
2.3.6-pre1  BAD
2.3.5-pre6  BAD   BAD