title: Issues with wrapping PrismForms NavigationService
body: <p>In PrismForms we got the problem, that the NavigationStack is empty after navigating to a new page. That means after using the hardware back-button on the SecondPage, the app is closed. Although the back-arrow in the header on Android isnt shown. If looking closely you can see the back-arrow for a short moment after the page is switched. I guess thats before the NavigationStack gets cleared.</p>
  
  <p>To the first page we navigate with the following command in OnInitialized() in our App.xaml.cs which derives from PrismApplication.</p>
  
  <pre><code>    NavigationService.NavigateAsync("NavigationPage/StartPage");
  </code></pre>
  
  <p>(If only Navigating to „StartPage“ here, the Stack doesnt get cleared.)</p>
  
  <p>That has do to with PageNavigationService.ProcessNavigationForNavigationPage(...) calling
          bool clearNavStack = GetClearNavigationPageNavigationStack(currentPage); and PageNavigationService.ProcessNavigationForContentPage(...) not.</p>
  
  <p>From the StartPage to the next we navigate with NavigateAsync("SecondPage")“. Here the described behaviour appears.</p>
  
  <p>For navigation we use a class which wraps the Prism NavigationService. We hold him as a property and get him via Unity in our constructor:</p>
  
  <pre><code>    this.PrismNavigation = prismNavigation ?? throw new ArgumentNullException(nameof(prismNavigation));
  </code></pre>
  
  <p>The methods „NavigateAsync“ and „GoBackAsync“, etc. we just pass through. </p>
  
  <p>This way we want to seperate our ViewModel-Project from references to XamarinForms to later be able to use the same ViewModels for for example a WPF-GUI.</p>
  
  <p>Why is the stack beeing cleared by our own NavigationService? If we register the original Prism NavigationService in App.xaml.cs instead, navigating back works as expected again. We found the point in the framework and could avoid the clearing with a drity hack, but that’s against the navigation-logic implemented in PrismForms, but we don’t understand how to do it the correct way.</p>
  
  <p>Every help appreciated!</p>