/// <summary> /// Cria uma nova MainPage (que por sua vez abre a Dashboard) /// </summary> protected override bool OnBackButtonPressed() { var page = new MainMasterPage(); Application.Current.MainPage = page; return(true); }
async void OnSignInClicked(object sender, System.EventArgs e) { IsEnabled = false; if (entryUsername.Text == "" && entryPassword.Text == "") { await DisplayAlert("Login", "Login successful", "Ok"); var page = new MainMasterPage(); Application.Current.MainPage = page; // MainPage inicial é LoginPage. Com um login bem sucedido basta trocar MainPage para a pagina desejada. } else { await DisplayAlert("Login", "Login failed. Wrong credentials", "Try again."); var page = new MainMasterPage(); Application.Current.MainPage = page; } IsEnabled = true; }