Maui icon indicating copy to clipboard operation
Maui copied to clipboard

[BUG] Expander: BoxView Inside expander isn't rendered on iOS

Open cvchris opened this issue 5 months ago • 0 comments

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

We use Expander component and inside it we use a BoxView with HeightRequest = 1, as a seperator. On iOS, the BoxView isn't rendered. If I switch from white to dark mode ** while the Expander is expanded**, it is rendered successfully. On Android this behavior is not reproduced

I have created a sample repository, this bug is also reproduced on our production app.

iOS: https://github.com/user-attachments/assets/aed18af9-b604-46bf-87bf-0973ce64b170

Android: https://github.com/user-attachments/assets/28fb749f-7a8c-4b34-9abb-30093b7429ba

Expected Behavior

The Boxview should be correctly rendered on iOS when inside an expander (as it does on Android)

Steps To Reproduce

  1. Download repo on Mac and Build on iOS
  2. Expand expander(the boxview is not rendered)
  3. Switch to dark mode
  4. The boxview is rendered

Link to public reproduction project repository

https://github.com/cvchris/CommunityToolkit.Maui.ExpanderBug

Environment

- .NET MAUI CommunityToolkit: 12.1.0
- OS: iOS 18.5 / Android 15
- .NET MAUI:
.Net Maui 9.0.90

Anything else?

No response

cvchris avatar Jul 25 '25 11:07 cvchris