title: How to redirect to next view page in Xamarin Forms?
body: <p>How can I redirect my user to next view after the functions are loaded? I have two pages <strong>Sync Page</strong> and <strong>Main Menu Page</strong> and four functions inside Sync Page that will be loaded upon loading of my page then after loading that four functions it should redirect my user to my main menu page. <br/><br/></p>
  
  <p>The problem is upon loading my sync page it will initialize the four functions and my navigation function it will redirect to my <strong>Main Menu Page</strong> then it will redirect back to my <strong>Sync Page</strong><br/></p>
  
  <p>Here is the code of my Sync Page</p>
  
  <pre><code>    public SyncPageViewModel(string host, string database, string contactID)
      {
          InsertActivityData(host, database, contactID);
          InsertCAFData(host, database, contactID);
          InsertContactsData(host, database, contactID);
          InsertActivityData(host, database, contactID);
          OnSyncComplete();
      }
  </code></pre>
  
  <p>Here is the code of my navigation</p>
  
  <pre><code>public void OnSyncComplete()
      {
          Application.Current.MainPage.Navigation.PopAsync();
          Application.Current.MainPage.Navigation.PushAsync(new MainMenu(), true);
      }
  </code></pre>