0
votes

I am using Prism for Xamarin Forms application development.

May be because I am new to both Prism and Xamarin Froms because of which I am facing a basic issue with the navigation.

Let me start with the details of my implementation and then the issue at hand.

  1. I have a MasterDetail Page (named Home) which is my main page. There are a few menu items in the Master Page. One of them is Partner.
  2. On Click of Partner menu item, NavigationService.NavigateAsync("Navigation/Partner") method is called. Where "NavigationService" is of type "INavigationService".
  3. This opens a page called "Partner" which is a tabbed page (TabbedPage). The first tab is a contentpage called "PartnerAll".
  4. PartnerAll page contains a listview. On click of a list view item, a new page is opened "PartnerDetails" by calling NavigationService.NavigateAsync("Navigation/PartnerDetails", parameters, false, true);
  5. On PartnerDetails page, I have added a toolbaritem called "Cancel".

Issue: When "PartnerDetails" page opens up, "Cancel" item shows up twice, as shown in the screenshot: screenshot of partner details page with two cancel buttons

Where is it I am going wrong. What should I do to make it work?

Please assist.

Best regards, Ankur Jain

2

2 Answers

0
votes

You should just pass in the identifier string for your destination page, instead of pushing another instance of the NavigationPage onto the stack

do it like so NavigationService.NavigateAsync(PartnerDetails);

1
votes

You’re pushing two NavigationPage’s onto the Navigation Stack. This would result in two Navigation bars. You can see in your screenshot you have both a back and a hamburger menu icon.