OnNavigatedTo is not called when navigating from a specific page
See original GitHub issueDescription
OnNavigatedTo
on MapsUIPage.cs is never called when visiting from MapPage.cs via Shell navigation and always called when visiting from all other pages.
Reproduction project: AndroidBluetoothBeaconTest.zip
Steps to Reproduce
- run app
- click MAUI Map item in menu
- click MapsUI Map item in menu - OnNavigatedTo is not called when visiting from that MAUI Map page (MapPage.xaml)
Reproduction video (the breakpoint should be triggered on every navigation to the page but was only triggered when navigating from the “Scan bluetooth devices” page).
Version with bug
7.0 (current)
Last version that worked well
7.0 (current)
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
Android 12
Did you find any workaround?
no
Relevant log output
No response
Issue Analytics
- State:
- Created 6 months ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
xamarin.forms - OnNavigatedTo is not called when using ...
I believe this is a bug, or at least an oversight in the API. It does call OnNavigatedTo , but only on the...
Read more >(Prism) Why does Navigation not work in OnNavigatedTo ...
Login button navigates as normal to Home page. However Login page should actually be skipped as OnNavigatedTo has Navigate to Home code. Top ......
Read more >Page.OnNavigatedFrom(NavigationEventArgs) Method
OnNavigatedFrom is invoked by default when you navigate between pages in your app. You can override this method and get info about the...
Read more >Windows 8.1 Apps with XAML and C# Unleashed
When you navigate to a Page by calling Navigate, you get a new instance of it, regardless of NavigationCacheMode. No special relationship exists...
Read more >Learning .NET MAUI: Unlock the potential of .NET MAUI for ...
InsertPageBefore method inserts a specified page in the navigation stack ... and has been navigated to the HomePage , the LoginPage is not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You have the same route registered twice for different pages. Change the route name for the pages and it should work.
@PureWeen Is this normally allowed? Should it throw if you try and register the same path for different pages?
Verified this issue with Visual Studio Enterprise 17.7.0 Preview 2.0. Can repro on android platform with sample project. Android.zip