I have a problem. I want to create a rounded image, so I created this code:
<Frame Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" VerticalOptions="Center"
CornerRadius="100" IsClippedToBounds="True" HeightRequest="70" WidthRequest="70">
<Image Source="User_Vreesie_Logo.png"
VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" />
</Frame>
Now I hoped that I would get a rounded image with the size 70x70, but I get very long (width) frame with rounded corners and a tiny squared image in the middle. How can I fix this?
Try these:
Padding="0"
HeightRequest
/ WidthRequest
to the image as Image doesn't seems to automatically scale in Xamarin.Aspect="AspectFit"
in Image
. It will scale the image to FIT the view but there can be white bands OR you can use Aspect="AspectFill"
. It will scale the image to fill the entire view but border image parts can get cut.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With