maui
maui copied to clipboard
RoundRectangle Border is messed up when contains an Image with AspectFill
Description
so when you put an image inside of a Border with RoundRectangle set to it, the border itself in the corners doesn't show up correctly, let me show a screenshot:
and this is my xaml code:
<Border
HeightRequest="250"
StrokeShape="RoundRectangle 40"
StrokeThickness="2"
Stroke="#e8ff8e"
WidthRequest="100">
<Image Source="{Binding Image}" />
</Border>
when i set the StrokeThickness to a large value like 20 the result is interesting, there is no curved border:
this behavior is just on Android, i tested with windows and it seems to work fine on small StrokeThickness but with a large value it would do a strange behavior too :)
with small StrokeThickness on Windows:
with a large value, there you can see a gap between the border and the image:
in fact with a small StrokeThickness you can also see the gap, but its barely visible. didn't test on iOS so i don't know about it.
Steps to Reproduce
Just put an AspectFill Image inside of a Border and set the StrokeShape to RoundRectangle with some CornerRadius
Link to public reproduction project repository
No response
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 12.0
Did you find any workaround?
No response
Relevant log output
No response