title: Xamarin Forms Navigation and dealing with a Login Page
body: <p>I'm trying to create an App with a Login Page as the first page.</p>
  
  <p>Once the user logs in, the pages that come after will be in a standard page stack organisation so I can easily use the build in <code>Navigation</code> object and wrap everything in Navigation pages.</p>
  
  <p>e.g.</p>
  
  <pre><code>Login Page -&gt; MainAppPage  |-&gt; Category1Page -&gt; Cat1SubPage
                             |-&gt; Category2Page -&gt; Cat2SubPage
  </code></pre>
  
  <p>My understanding is that I should wrap <code>MainAppPage</code> with <code>new NavigationPage()</code>, and then I'll have access to the Navigation object allowing me to do things like this:</p>
  
  <pre><code>await this.Navigation.PushAsync(new Category1Page());
  </code></pre>
  
  <p>And the various platforms will give me automatic back button support to go back to the previous page.</p>
  
  <p>But I don't want a user to navigate from LoginPage -> MainAppPage in this manner, because I don't want the backbutton to take them back to Login, without them explicitly hitting the logout button.</p>
  
  <p>So how should I handle that first Page Transition from LoginPage -> MainApp Page. </p>
  
  <p>Is there an alternative way to have 2 <code>Primary</code> pages and swap between them? Or is there a way to intercept the back button requests on MainAppPage and discard them?</p>
  
  <p>Not finding an awful lot of info in the documentation regarding this, but it seems like a fairly standard requirement so possibly PEBKAC</p>