title: How to differentiate StartUp screens in Xamarin Forms Shell
body: <p>I have registration/login section as well main content.</p>
  
  <p>Main content has tabbar section (down tabs), but I want to only show those tabs in main sectiom. registration/login section dont have.
  First, in my App.cs I need to check if user exists (credentials from secure store), and on based what my api returns as an answer, I need to show to user correct page (some step in registration where he stopped last time, or if are credentials OK, to redirect im to main sector with down tabs)</p>
  
  <p>I setup my AppShell as follows:</p>
  
  <pre><code>    &lt;ShellItem Route="login"&gt;
          &lt;ShellContent ContentTemplate="{DataTemplate login:Page1}" /&gt;
          &lt;ShellContent ContentTemplate="{DataTemplate login:Page2}" /&gt;
      &lt;/ShellItem&gt;
  
      &lt;ShellItem Route="register"&gt;
  
          &lt;ShellContent ContentTemplate="{DataTemplate register:RegisterPage1}" /&gt;
          &lt;ShellContent ContentTemplate="{DataTemplate register:RegisterPage2}" /&gt;
          &lt;ShellContent ContentTemplate="{DataTemplate register:RegisterPage3}" /&gt;
      &lt;/ShellItem&gt;
  
  
      &lt;TabBar Route="main"&gt;
          &lt;Tab Title="Activity" Icon="tab_feed.png"&gt;
              &lt;ShellContent ContentTemplate="{DataTemplate postlogin:ActivityPage}" /&gt;
          &lt;/Tab&gt;
          &lt;Tab Title="Invest" Icon="tab_about.png"&gt;
              &lt;ShellContent ContentTemplate="{DataTemplate postlogin:InvestPage}" /&gt;
          &lt;/Tab&gt;
      &lt;/TabBar&gt;
  </code></pre>
  
  <p>Know I want somehow to tell codebehind of AppShell, to based on response of my api to go to specific routing page. I tried something like:</p>
  
  <pre><code>public AppShell()
          {
              MainThread.BeginInvokeOnMainThread(async () =&gt;
              {
                  await Shell.Current.GoToAsync("//register");
              });
              InitializeComponent();
          }
  </code></pre>
  
  <p>But I have null reference exception. 
  Do you have maybe better architectural solution?</p>