Skip to content

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

@cvchris

Description

@cvchris

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions