IsPlatformEnabled is false for RoundRectangle stroke shape of a Border, hence the parent element is not displayed on UI #21356
Replies: 2 comments
-
Setting the RoundRectangle.IsPlatformEnabled to true also seems to work. However, using that property outside of .NET Maui is not a recommandation. |
Beta Was this translation helpful? Give feedback.
-
The reason for not having the same issue when the StrokeShape is not defined on a border is because its default value is |
Beta Was this translation helpful? Give feedback.
-
Hello,
I need to use a custom Layout component, and inside of it I want to place a Border that has a RoundRectangle stroke shape.
I will add bellow a sample code:
The problem is that the the scrollview inside the Flex Layout is not displayed.
I did some investigation, and it seems that the elements are not rendered, because of this condition (the LayotuChildren method is not called because the method returns false):
https://github.com/dotnet/maui/blob/main/src/Controls/src/Core/Layout.cs#L636
Does anyone have a workaround for this? If I set the visibility of the border to false, and set it to true when the ScrollView becomes visible, that works.
I tried setting the IsPlatformEnabled on the Border element, but that doesn't work, since the stroke shape element has the IsPlatformEnabled value false.
Do you have any other ideas / suggestions?
Possible related questions / issues (none with a solution):
#19274
#20534
Beta Was this translation helpful? Give feedback.
All reactions