Bug 36194 - Wrong image size in landscape mode
Summary: Wrong image size in landscape mode
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-11-24 03:12 UTC by Falko Schindler
Modified: 2017-09-01 03:14 UTC (History)
7 users (show)

Tags: Android iOS Windows ac, layout, stacklayout, landscape
Is this bug a regression?: ---
Last known good build:

screenshot (76.35 KB, image/png)
2015-11-24 03:12 UTC, Falko Schindler
the test image (24.74 KB, image/jpeg)
2015-11-24 03:13 UTC, Falko Schindler
Repro project (3.48 MB, application/x-zip-compressed)
2016-02-08 16:00 UTC, E.Z. Hart [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 36194 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 Falko Schindler 2015-11-24 03:12:12 UTC
Created attachment 13964 [details]

The following page contains a label and an image:

    MainPage = new ContentPage {
        Content = new StackLayout {
            VerticalOptions = LayoutOptions.Fill,
            Children = {
                new Label {
                    Text = "label",
                new Image {
                    Source = "brett.jpg",
                    VerticalOptions = LayoutOptions.FillAndExpand,

When displayed in landscape mode, the 8x6 checkerboard image is too high (by the amount of the label height).

In portrait mode the size is just right.

The bug occurs on both iOS and Android at least since Xamarin.Forms 1.3.3.
Comment 1 Falko Schindler 2015-11-24 03:13:18 UTC
Created attachment 13965 [details]
the test image
Comment 2 E.Z. Hart [MSFT] 2016-02-08 16:00:45 UTC
Created attachment 14941 [details]
Repro project
Comment 3 E.Z. Hart [MSFT] 2016-02-08 16:01:53 UTC
Also doesn't work as expected in Windows Phone 8.1.
Comment 4 adrianknight89 2016-09-24 01:21:01 UTC
This seems to be a problem with the stack layout. If you set page content to a contentview where the image is embedded, then resizing functions as expected.