Bug 32290 - Images not respecting vertical bounds of StackLayout
Summary: Images not respecting vertical bounds of StackLayout
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.5.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-07-22 04:40 UTC by Adam Hartley [MSFT]
Modified: 2017-12-07 15:25 UTC (History)
10 users (show)

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


Attachments
Sample (653.38 KB, application/zip)
2015-07-22 04:40 UTC, Adam Hartley [MSFT]
Details
1.3.3.6323 (134.38 KB, image/png)
2015-07-29 12:01 UTC, Paul DiPietro [MSFT]
Details
1.4.4.6392 (131.39 KB, image/png)
2015-07-29 12:02 UTC, Paul DiPietro [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 32290 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 Adam Hartley [MSFT] 2015-07-22 04:40:33 UTC
Created attachment 12151 [details]
Sample

## Overview

With a StackLayout that has the following "VerticalOptions = LayoutOptions.CenterAndExpand", images can extend beyond the lower bounds of the StackLayout.

This only appears to happen in the latest version of Forms and works as expected in previous versions (tested with 1.3.3).

## Steps to reproduce

1. Download attached sample
2. Make sure the Forms package is >= 1.4.3
3. Run on an emulator such as a Nexus 4
4. Once the app is loaded, rotate it to landscape to see the effect more clearly

## Expected result

Image should respect it's AspectFit and not overflow beyond the bounds of the StackLayout.

## Actual result

Image overflows beyond the bounds of the StackLayout.

## Notes

http://forums.xamarin.com/discussion/45896/weird-behavior-with-image-bounds
Comment 2 pharout734 2015-07-22 09:57:37 UTC
To add to the report, it does not matter what VerticalOptions value is selected for the StackLayout and the overflow behavior occurs with any of the available Aspect settings.  I do have to specify a MinimumHeightRequest in order to get the middle StackLayout to not just take up the whole vertical space occupied by its content.  Could it be that the image it calculating its display height prior to the StackLayout's MinimumHeightRequest being taken into consideration?
Comment 3 Paul DiPietro [MSFT] 2015-07-29 12:01:41 UTC
Created attachment 12285 [details]
1.3.3.6323
Comment 4 Paul DiPietro [MSFT] 2015-07-29 12:02:35 UTC
Created attachment 12286 [details]
1.4.4.6392
Comment 5 Paul DiPietro [MSFT] 2015-07-29 12:03:34 UTC
This appears to still be occurring as of 1.4.4.6392.
Comment 6 Rui Marinho 2016-04-13 18:15:07 UTC
Still present on  2.1
Comment 7 Paul DiPietro [MSFT] 2017-12-07 15:25:16 UTC
Behaves the same/still present on 2.5