question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Navigation.PushAsync not working

See original GitHub issue

new Button("Open Window") .OnClicked(async() => { await Navigation.PushAsync<FullColorWindow>(); })

I added this code to MainPage (demo) and created a new component named FullColorWindow with its own children items.

Expected behavior App displays the component named FullColorWindow

What happened Nothing after clicking on the button multiple times nothing happens PS: no errors & exception.

Thank you.

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
DevPlus31commented, Apr 15, 2023

Thank you

0reactions
adospacecommented, Apr 15, 2023

@DevPlus31 In standard dotnet maui it’s required to have either a NavigationPage as a parent or a Shell to navigate between pages (MAUI itself should warn in case neither of them is available but maybe there is a good reason for that I’m not aware of).

NavigationPage: https://learn.microsoft.com/en-us/dotnet/maui/user-interface/pages/navigationpage?view=net-maui-7.0 Shell: https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/shell/navigation?view=net-maui-7.0

I agree with @freever that maybe you’re looking for a way to just swap the root content page of a Window: answer to #56 could be useful in that case

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xamarin.Forms Navigation.PushAsync Not Working
I have a Xamarin.Forms project, and I have a custom control that should open a new page when tapped. Unfortunately, nothing happens when...
Read more >
i want to navigate from a page to an other page
Welcome to our Microsoft Q&A platform! i get this error "PushAsync is not supported globally on Android, please use a NavigationPage." This is ......
Read more >
Navigation.PushModalAsync() does nothing - Microsoft Q&A
Hello, I've a Shell-based XF app and upgraded recently from 4.6.0.847 to (currently) 5.0.0.1931. On some page, I handle a tap event like ......
Read more >
[Bug] Shell - Navigation.PushAsync - Navigation Bar ...
Description I created a new Xamarin Forms project using the Shell Template. From the ItemsPage, when navigating to the detail page using ...
Read more >
PushAsync not working after OnPageLoading ...
I am executing await Navigation.PushAsync(new Page());. I can see the new page added to the Navigation.NavigationStack.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found