Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Transparent Page when using PopModalAsync?

$
0
0

Trying to have a modal popover displayed with a transparent background. I've set the Page BackgroundColor, the Content BackgroundColor and any nested children BackgroundColor to Transparent, but there still appears a default white background.

I call the PushModalAsync like this:

await App.Navigation.PushModalAsync(new BusyPage());

The content of the Page is this:

public class BusyPage : ContentPage
    {
        public BusyPage ()
        {
            BackgroundColor = Color.Transparent;
            this.Content = new StackLayout
            { 
                Children = 
                {
                    new Label { Text = "Loading", BackgroundColor = Color.Transparent, HorizontalOptions = LayoutOptions.Center },
                    new ActivityIndicator 
                    {
                        IsVisible = true,
                        IsRunning = true,
                    }
                },
                VerticalOptions = LayoutOptions.CenterAndExpand,
                BackgroundColor = Color.Transparent
            };
        }
    }

Can I accomplish a transparent modal with Xamarin.Forms?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>