Bug 36470 - Image in Grid is ignoring WidthRequest and HeightRequest since Xamarin Forms 2.0
Summary: Image in Grid is ignoring WidthRequest and HeightRequest since Xamarin Forms 2.0
Status: RESOLVED NORESPONSE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.0.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-12-02 16:13 UTC by David Tavárez
Modified: 2016-05-19 08:23 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
result (386.51 KB, image/png)
2015-12-02 16:13 UTC, David Tavárez
Details
Image Beyond Frame (81.53 KB, image/png)
2016-05-19 08:23 UTC, Max
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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description David Tavárez 2015-12-02 16:13:21 UTC
Created attachment 14078 [details]
result

I have an image inside a Grid on a Listview. Since I updated to Xamarin Forms 2.0 the render is ignoring WidthRequest and HeightRequest

readonly Label Message = new Label () {
			VerticalOptions = LayoutOptions.Center,
			Text = "", 
			FontSize =  Device.GetNamedSize(NamedSize.Small,typeof(Label))
		};

		readonly Image UserPicture = new Image () {
			BackgroundColor = Color.Transparent,
			HeightRequest = 0,
			WidthRequest = 0,
			Aspect = Aspect.AspectFill,
		};

		readonly CachedImage AlbumPreviewPicture = new CachedImage () {
			WidthRequest = 56,
			HeightRequest = 48,
			DownsampleWidth = 56,
			Aspect = Aspect.AspectFill,
			FadeAnimationEnabled = false,
			TransparencyEnabled = false,
		};

And my layout is this:

var grid = new Grid {
				Padding = 1,
				RowDefinitions = {
					new RowDefinition { Height = new GridLength (60, GridUnitType.Absolute) },
				},
				ColumnDefinitions = {
					new ColumnDefinition { Width = new GridLength (46, GridUnitType.Absolute) },
					new ColumnDefinition { Width = new GridLength (1, GridUnitType.Star) },
					new ColumnDefinition { Width = new GridLength (64, GridUnitType.Absolute) }
				},
				HorizontalOptions = LayoutOptions.Fill,
				ColumnSpacing = 10,
				VerticalOptions = LayoutOptions.Center,
			};

			grid.Children.Add (UserPicture, 0, 0);
			grid.Children.Add (Message, 1, 0);
			grid.Children.Add (AlbumPreviewPicture, 2, 0);

			View = grid;
Comment 1 E.Z. Hart [MSFT] 2016-02-05 00:15:17 UTC
(In reply to David Tavárez from comment #0)
> Created attachment 14078 [details]
> result

David,

Could you attach an image showing what you expect the result of the layout to be? 

Event better, could you post a repro project which demonstrates the behavior? 

Thanks,
The Xamarin Forms Team
Comment 2 E.Z. Hart [MSFT] 2016-04-13 20:12:49 UTC
Thank you for your bug report. As we have not received the information requested, we cannot properly triage your bug and are marking it resolved.

Warm regards,
Xamarin Forms Team
Comment 3 Max 2016-05-19 08:23:48 UTC
Created attachment 16034 [details]
Image Beyond Frame

Image is bigger than <Frame> Control.
This is via Xamarin.Form, no device specific codes.