title: Xamarin Forms - Find current page of App from class not inhereting from ContentPage
body: <p>My question isn't as simple as the title suggests.. I'm aware that I can use the navigation stack to find out the top-most page and call the navigation event on that page.</p>
  
  <p>This is what I was planning on doing..</p>
  
  <pre><code>        Page currentPage;
          int index = Application.Current.MainPage.Navigation.NavigationStack.Count - 1;
          currentPage = Application.Current.MainPage.Navigation.NavigationStack[index];
  
          //after getting the correct page..
          //await currentPage.Navigation.PushAsync(new SomePage());
  </code></pre>
  
  <p>My problem is that the index is returning as <code>-1</code>.
  I believe there's some added complexity due to my page hierarchy/structure.</p>
  
  <p>My Apps main page is a <code>LoginPage</code> - and once the user has successfully logged in,  they are pushed to a Modal page, which then has the rest of the navigation taking place from there. </p>
  
  <p><code>await Navigation.PushModalAsync(new NavigationPage(new MainMenu()));</code></p>
  
  <hr>
  
  <hr>
  
  <p><strong>How can I find the current active page (that the user is viewing) - from a class that is not inheriting from a ContentPage, when the NavigationStack includes a modal page?</strong></p>
  
  <p>I need to do this so that my static 'helper' class (which the platform specific iOS / Android code accesses) can be passed a string for the page name, and this helper class can resolve that name, and navigate to the page if it exists. The helper class is being accessed via platform-specific implementations after an event on the phone (push notification tapped on)</p>