Home Make image fill whole container of stacklayout

# Make image fill whole container of stacklayout

Pettanord
1#
Pettanord Published in 2017-12-07 18:56:53Z
 Hi I have this Xamarin Forms app where I have the following layout:   The problem is that I can't get the image called tvbild.png, to fill the whole container in the iOS app. I would like the image to have the same width size as the button (see attached image). How can I accomplish this? Thanks for help! Peter
Benl
2#
 Assuming image size is known; use separate row in Grid for image and button and set HeightRequest for Image and ColumnDefinition Width for Grid, see sample below: Original image width is 100 and height is 50. Width of container is 300. Find scale factor based on width of container and width of image: 300/100=3 Find HeightRequest based on scale and height of image: 3*50=150: