Bug 58938 - StackLayout children drawing past bottom of parent
Summary: StackLayout children drawing past bottom of parent
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.4.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-08-21 22:09 UTC by Joe Manke
Modified: 2017-11-14 00:27 UTC (History)
5 users (show)

Tags: stacklayout, parent, ac
Is this bug a regression?: ---
Last known good build:


Attachments
Reproduction project (318.26 KB, application/x-zip-compressed)
2017-08-21 22:09 UTC, Joe Manke
Details
Screenshot demonstrating StackLayout behavior (351.67 KB, image/png)
2017-08-23 16:19 UTC, Joe Manke
Details
Screenshot demonstrating Grid behavior for comparison (332.81 KB, image/png)
2017-08-23 16:20 UTC, Joe Manke
Details
Screenshot of behavior in a ListView (5.19 KB, image/png)
2017-08-23 18:49 UTC, Joe Manke
Details
Screenshot of behavior in a ListView (340.48 KB, image/png)
2017-08-23 18:54 UTC, Joe Manke
Details
ListView repro (306.74 KB, application/x-zip-compressed)
2017-10-25 20:28 UTC, Joe Manke
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 58938 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 Joe Manke 2017-08-21 22:09:24 UTC
Created attachment 24341 [details]
Reproduction project

With a sufficiently large View as the child of a StackLayout, it is possible for the drawing of the child to extend beyond the bounds of its parent.

Steps to reproduce:

1. Create new Xamarin.Forms solution
2. Make content of MainPage a StackLayout. Give both the page and the layout some Padding and BackgroundColor so you can see the bounds of the layout.
3. Add a large view to the StackLayout; for example, a Label with several paragraphs of text.
4. Run the app and you will see that the text of the Label overruns the bottom bound of the StackLayout.

I verified this behavior occurring in 2.3.3, 2.3.4, and 2.4.0-pre1.
Comment 1 Paul DiPietro [MSFT] 2017-08-23 15:18:32 UTC
Could you possibly elaborate on what you expect would occur in a situation like this?
Comment 2 Joe Manke 2017-08-23 16:18:20 UTC
I would probably expect it to behave more like the Grid, which will just cut off the child when it reaches the bounds of the parent.
Comment 3 Joe Manke 2017-08-23 16:19:28 UTC
Created attachment 24377 [details]
Screenshot demonstrating StackLayout behavior
Comment 4 Joe Manke 2017-08-23 16:20:00 UTC
Created attachment 24378 [details]
Screenshot demonstrating Grid behavior for comparison
Comment 5 Joe Manke 2017-08-23 18:49:10 UTC
Created attachment 24383 [details]
Screenshot of behavior in a ListView

The repro project is just the simplest reproduction case, this is closer to how I initially encountered the bug; in a ListView, the StackLayout child is escaping its cell entirely and drawing underneath the next cell.
Comment 6 Joe Manke 2017-08-23 18:54:01 UTC
Created attachment 24384 [details]
Screenshot of behavior in a ListView
Comment 7 Paul DiPietro [MSFT] 2017-09-27 17:12:48 UTC
An updated repro with the ListView is appreciated if you have the time but I'll set this to confirmed for now until it can be investigated further to determine expected behavior. That said, I think the cell behavior is a bigger issue of the two.
Comment 8 Joe Manke 2017-10-25 20:28:02 UTC
Created attachment 25455 [details]
ListView repro