protected override void OnBackKeyPress(CancelEventArgs e) { if (vm.BackButtonPressed()) { e.Cancel = true; return; } else if (toast == null) { toast = SimpleToastNotification("Please press BACK again to Leave the Game"); toast.Dismissed += (sender, args) => { toast = null; }; toaster.Show(toast); e.Cancel = true; return; } toaster.Hide(toast); toast = null; base.OnBackKeyPress(e); }