© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
1 reply
CG Seb

MAUI Popup at first start

Hi everyone,

I created a MAUI app for windows (later mac), I would like to show a GCU popup at the first launch of the app. I tried to use the
OnAppearing()
OnAppearing()
of my Home page, but since it's not an async method, it doesn't wait for my popup. The popup only show if I go to another page and then go back to the home page 😦

protected override void OnAppearing()
{
    bool GCUAccepted = Preferences.Get(Constants.GCU_ACCEPTED_KEY, false);
    if (!GCUAccepted)
    {
        GCUPopupPage page = new();
        popupNavigation.PushAsync(page);
    }

    viewModel.LoadRecentsCommand.Execute("");
    viewModel.LoadFavoritesCommand.Execute("");
    base.OnAppearing();
}
protected override void OnAppearing()
{
    bool GCUAccepted = Preferences.Get(Constants.GCU_ACCEPTED_KEY, false);
    if (!GCUAccepted)
    {
        GCUPopupPage page = new();
        popupNavigation.PushAsync(page);
    }

    viewModel.LoadRecentsCommand.Execute("");
    viewModel.LoadFavoritesCommand.Execute("");
    base.OnAppearing();
}


Do you guys have any Idea on how to do this please?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

WebView in NET8 MAUI MacOS wont show popup
C#CC# / help
3y ago
Should i start with MAUI?
C#CC# / help
2y ago
❔ start Phone call in .Net MAUI
C#CC# / help
3y ago