Popup: new OverlayColor property. #1799
Replies: 4 comments 6 replies
-
I learned how to do it (at least for Android). If anyone needs to do this aswell, I created a custom handler so it would remove the "Overlay", which I now know is actually called Dim.
This has completely removed any Dim from any popups for all Android versions. |
Beta Was this translation helpful? Give feedback.
-
I am surprised this wasn't done when the control was created. I am trying to change the background color of the overlay for popups on Windows at the moment because it based it on the Windows theme color? I think. So I have a popup that has a white background (due to company branding) and now it clashes with the overlay. Any workarounds for Windows? I have tried forcing the the app to dark mode but seems to make no difference. |
Beta Was this translation helpful? Give feedback.
-
not sure if this is being looked at @bijington can advise. |
Beta Was this translation helpful? Give feedback.
-
You can take full control of the screen with:
Then, you can control/tinge the color of the entire screen and size your content at the center of the screen: <toolkit:Popup HorizontalOptions="Fill" VerticalOptions="Fill" Color="Transparent">
<Grid>
<BoxView x:Name="tinge" BackgroundColor="SkyBlue" Opacity="0.1" />
<Grid Width="200" Height="200">
<!-- Your content here -->
</Grid>
</Grid>
</toolkit:Popup> |
Beta Was this translation helpful? Give feedback.
-
As per this discussion #824, that was closed a long time ago, I see value in being able to change the color of the shown overlay when a Popup appears. Here an example of the "overlay":
No popup:
Popup shown:
What I mean by "overlay" is the white tinge that appears all over the screen.
The reason why I'd want this feature is that I'd been trying to create a "Context menu" for a MAUI mobile focused App, that opens up when I click a button. As shown here, when I click the 3 dotted button:
The best native implementation I've found for this is to create a Popup with a transparent color property (I'm not allowed to create Hybrid implementations for this particular project). For some reason this works like I want when testing in Android API 34 Platform Version, but when I test in API 31 or lower versions (haven't tried exactly all versions) it does create the "overlay tinge". As shown here:
Because of this I've had to try other implementations that don't use the CommunityToolkit.Maui Popup object, which is what I'd prefer to use.
As a side note if anyone knows of a good way to implement the controler I've described, I'd appreciate tips on that. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions