Maui -- How to make the background color transparent?

Viewed 1072

I'm trying to write a program that would be used as an overlay on top of another program. I want the text, buttons, and border to be solid, and the background to be transparent.

<VerticalStackLayout Spacing="25" Padding="30" BackgroundColor="Transparent" IsVisible="True" Opacity="1">

That works for one of the layers, but it appears that there are multiple layers.

Here it mentions changing the ContentPage, which I tried, and it appears not to be working.

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         x:Class="NameSpace.MainPage"
         xmlns:local="clr-namespace:NameSpace"    
         BackgroundColor="Transparent">

I also tried:

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         x:Class="NameSpace.MainPage"
         xmlns:local="clr-namespace:NameSpace.Core.Views.CustomControls"    
         BackgroundColor="Transparent">

I changed the Shell to include a Transparent background color, which didn't help.

<Shell
x:Class="NameSpace.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:NameSpace"
Shell.FlyoutBehavior="Disabled"
BackgroundColor="Transparent">

It appears that nothing changed when changing either the ContentPage or the Shell.

None of those seem to change the background color behind the VerticalStackLayout. Any ideas?

1 Answers
Related