Closed filipnavara closed 1 week ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
@filipnavara TBH this probably won't get scheduled any time soon.
We're marking Frame
as obsolete in .NET9 so that's where we'll be putting most of our effort
I filed the issue mostly to make it easy to search for a workaround, and I don’t expect it to get any prioritisation at all. Once I figured the root cause the workaround was just 8 lines of code in our project.
Description
The
Frame
control implements theIBorderElement
interface and unconditionally returnsIBorderElement.BorderWidth => 1
whether the border is visible or not. The default color for the border isnull
.In Xamarin.Forms you could make a round frame by instantiation
Frame
withIsClippedToBounds = true, CornerRadius = N/2, WidthRequest = N, HeightRequest = N
(roughly) and the inner content view set to theContent
property would be clipped to a circle.In MAUI, however, the inner view is offset by the
IBorderElement.BorderWidth
during layout. If you setBackgroundColor
toColors.Tan
and then the background of the inner content to something else, you'll notice that the "border area" remains tan despite the frame having no border set.Example of the visual artifact:
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.61 SR6.1
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
No response
Did you find any workaround?
Yes, implement
IBorderElement.BorderWidth
in our control derived fromFrame
and return 0.Relevant log output
No response