PrismLibrary / Prism

Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Xamarin Forms, and Uno / Win UI Applications..

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] No destination with ID 2 is on the NavController's back stack

AwsomeCode opened this issue · comments

Description

image

Steps to Reproduce

  1. The app starts with MainPage
  2. Navigate to FirstPage
  3. Navigate back to MainPage (Exception!)

Repo

Platform with bug

.NET MAUI

Affected platforms

Android

Did you find any workaround?

NO

Relevant log output

No response

@AwsomeCode

  • Do not register the Maui NavigationPage. Prism automatically provides a registration for both the TabbedPage and NavigationPage. In the specific case of the NavigationPage Prism uses the PrismNavigationPage which provides some better handling for BackButton scenarios with the Navigation Service. If you absolutely need to provide your own NavigationPage then you should inherit from the PrismNavigationPage.
  • Second I'm unable to reproduce the issue with the attached sample.
  • Second I'm unable to reproduce the issue with the attached sample.

Interesting.
Because it's a blank project, with prism only I have created a new blank project, the same as the old one, and it's working fine. Will try clearing the Bin and Obj folder. Let see.

@dansiegel Deleting the .vs folder worked. I don't get a relation with it but it worked.
Thanks for your time.