Example #1
0
 public void BeginNavigation(string pageName, IReadOnlyDictionary <string, object> parameters = null, bool hasNavBar = false)
 {
     Device.BeginInvokeOnMainThread(async() =>
     {
         try
         {
             var page = GetPageTo(pageName);
             Application.Current.MainPage = hasNavBar ? new NavigationPage(page) : page;
             await((IBaseViewModel)page.BindingContext).HandleNavigation(parameters);
         }
         catch (Exception ex)
         {
             await Alerts.CallAlertAsync("Error", "Not able to navigate to destination page", new AlertAction("OK"));
         }
     });
 }