CommunityToolkit / CommunityToolkit/Maui

[BUG] popup gradient background

Open
#2,823 7 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

I am currently using CommunityToolkit Popup v2. In the Styles.xaml file, I have defined the Background property with a gradient brush as shown below:

```

<Setter Property="Padding" Value="0"/>
<Setter Property="Background" Value="{StaticResource DefaultBackground}" />

```

When I open a popup using the following code:

```
this.ShowPopup(popup, new PopupOptions
{
BindingContext = this,
PageOverlayColor = Colors.Transparent,
Shape = null
});
```

or even with:

```
this.ShowPopup(popup, new PopupOptions
{
BindingContext = this,
PageOverlayColor = Colors.Blue,
Shape = null
});
```
…the overlay color doesn’t seem to have any visual effect. Instead of showing the desired PageOverlayColor, the page’s gradient background remains fully visible and seems to override the popup overlay. Also incase of transparent PageOverlayColor, page content is not showing.

### Expected Behavior

When PageOverlayColor is transparent, the underlying page content should be visible. If it's set to blue, the background behind the popup should appear blue, acting as an overlay.

### Steps To Reproduce

Mentioned in current behavior

### Link to public reproduction project repository

- https://github.com/volcorsoftware/BackgroundPopupIssue

### Environment

```markdown
- .NET MAUI CommunityToolkit:12.1.0
- OS: Android
- .NET MAUI: 9.0
```

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the linked BackgroundPopupIssue reproduction on Android and inspect its Styles.xaml gradient background and ShowPopup calls using PopupOptions. Compare transparent and blue PageOverlayColor behavior with the expected underlying content visibility and blue overlay, then verify the result against .NET MAUI CommunityToolkit 12.1.0.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.