I have an Image in a Grid, like so:
<Grid VerticalOptions="Fill" HorizontalOptions="Fill"> <Image Source="" Aspect="AspectFill" HorizontalOptions="Center" VerticalOptions="Fill"/> </Grid>
Now as an image source I have an image that has a larger width > height ratio then the grid. So what AspectFill does is crop the image on the right side.
But what I want it to do is crop it on both the left and right side, so that it displays the center piece.
Basically the same way as the Windows Desktop wallpaper does in it's "filled" option (see attachment).
How can I do this?
Keep in mind that the images are dynamically loaded and might have different width and height values. So I would like to stay away from fixed numbers.