Shell closing the page error

Sami 861 Reputation points
2023-10-24T11:39:14.9766667+00:00

On shell open first page like this and then open another page for details . when l am trying to close top page that I have error ..How can we solve it ?

'Ambiguous routes matched for: //D_FAULT_CustomTabBar12/D_FAULT_Tab7/plus/D_FAULT_HelpCenter14 matches found: //D_FAULT_CustomTabBar12/D_FAULT_Tab7/plus/D_FAULT_HelpCenter14,//D_FAULT_CustomTabBar12/D_FAULT_Tab7/plus/D_FAULT_HelpCenter14 (Parameter 'uri')'

 private async void Help_ButtonClickEvent(object sender, EventArgs e)
  {
   
          await Navigation.PushModalAsync(new HelpReturn());
}

  public ICommand BackCommand { get; } = new Command(async () => await App.Current.MainPage.Navigation.PopModalAsync());
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
2,977 questions
{count} votes

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 37,111 Reputation points Microsoft Vendor
    2023-10-26T07:21:21.0633333+00:00

    Hello,

    AppShell cannot be used in NavigationPage, which leads to confusion in the navigation stack.

    After testing, replacing AppShell with a ContentPage, this issue does not occur.

    var navigationPage = new NavigationPage(new MainPage());
    

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more