CommunityToolkit / CommunityToolkit/Maui

[BUG] Popup BackgroundColor should adhere to AppTheme

Open
#3,310 0 comments 0 reactions 0 assignees View on GitHub
bug unverified
Dominant language
C#
Stars
2.7k
Forks
500
Avg merge
2d 14h
Merged PRs (30d)
7

Description

### 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

## Bug
Popups using `DefaultPopupSettings` always default to a hardcoded `White` `BackgroundColor`. If the app is in dark mode, child controls (like `Label`) default their `TextColor` to `White` as well, making the text invisible against the background.

## Current Workaround Issues
Overriding `Options.DefaultPopupSettings.BackgroundColor` does not solve this because there is currently no way to bind `DefaultPopupSettings` to `AppTheme`. As a result, BackgroundColor must be explicitly set on every individual Popup instance via `{AppThemeBinding}`.

### Expected Behavior

The default `BackgroundColor` of popups should be the same as the for any other page. Therefore it adheres to the AppTheme.

### Steps To Reproduce

1. Make sure the devicetheme is in darkmode.
2. Open and run solution from reproduction repository.
3. Click the "Click me"-button.
4. The label of in the shown popup has a white `TextColor`.

### Link to public reproduction project repository

https://github.com/meyerdominik/MauiTest/tree/ToolkitPopupAppTheme

### Environment

```markdown
- .NET MAUI CommunityToolkit: 15.0.1
- OS: Android 15.0
- .NET MAUI: 10.0.100
```

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by locating the popup implementation and DefaultPopupSettings, then reproduce the issue using the linked MauiTest repository with the device in dark mode. The work is done when a popup using default settings follows AppTheme for its background and its child text remains readable without per-popup overrides.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
frontend, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.