Maui
Maui copied to clipboard
[BUG] Frame children are not rendered
Is there an existing issue for this?
- [X] I have searched the existing issues
Did you read the "Reporting a bug" section on Contributing file?
- [X] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
Current Behavior
When incorporating a Frame element inside a Popup element in .NET MAUI to present a Label, the label does not render on both Android and iOS platforms. Despite no error messages being displayed and the layout configuration appearing correct, the expected display of the label's text within the frame in the popup does not occur.
Expected Behavior
When adding a Label as a child to a Frame within a Popup in a .NET MAUI application, the label should be rendered correctly, displaying its text content visibly to the user. The Frame should act as a container for the Label, adhering to any specified layout properties (such as padding, margin, and alignment), and the Popup should display all included child elements as designed.
Steps To Reproduce
Create a new .NET MAUI project. Add CommunityToolkit.Maui with NuGet and in the MauiProgramm.cs Add a Popup element to the main page. Inside the Popup element, add a Frame. Place a Label with visible text as the content of the Frame.
Link to public reproduction project repository
https://github.com/divingmastergit/PopUpError.git
Environment
- .NET MAUI CommunityToolkit: 7.0.1
- OS:
Edition Windows 10 Pro 22H2 OS build 19045.4170
- .NET MAUI: 8.0.10
- .NET: 8.0.101
Anything else?
No response
Couldn't able to reproduce this issue. I have tested it in iOS 17.2. The label is getting rendered as expected.
@IniyansHub As seen on the screenshot the issue is for Android. I can reproduce that on my side and this it is pretty bad for anyone updating to community toolkit 8. Windows works also fine.
@divingmastergit an easy workaround is to use a border instead:
<Border
BackgroundColor="{DynamicResource ThemeBackgroundSecondaryColor}"
StrokeShape="RoundRectangle 10,10,10,10"
StrokeThickness="0">
..Dialog Content
</Border>
@divingmastergit , I verified the operation with the following versions.
.NET MAUI 8.0.70 Community Toolkit 9.0.2
[iOS]
[Android]
[Windows]
The problem appears to be resolved.
Thanks @cat0363 for sharing the feedback and results of your tests using the latest version. I'm closing this issue.