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
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.3.5
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
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:


Attachments
repro solution (285.30 KB, application/x-zip-compressed)
2016-08-16 18:10 UTC, Jimmy [MSFT]
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 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:
Status:
CONFIRMED

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 2.3.1.114 and 2.3.2.118-pre1
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.:

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


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