Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Filling all the space of the screen inside a relative layout

$
0
0

Hello

I have a relative layout inside of it I have an image and I want that image to fill all the space left vertically and horizontally something like this:

I have tried:

var image = new Image
            {
                //Source = aMessage.Url,
                //Aspect = Aspect.AspectFill,
                //VerticalOptions = LayoutOptions.FillAndExpand,
                //HorizontalOptions = LayoutOptions.FillAndExpand,
                BackgroundColor = Color.Red,
                WidthRequest = 200,
                HeightRequest = 200
            };

But the image is not showing, the only way that the image is showing is using width and height request, I have also tried including the relative view and a content view inside a stacklayout but is not working either.

Any ideas?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>