private async void DeleteButton_Clicked(object sender, EventArgs e) { var result = await noteManager.DeleteAsync(note); if (result) { DependencyService.Get <IMessage>().ShortAlert("Note deleted."); } else { DependencyService.Get <IMessage>().ShortAlert("Note can not be deleted."); } Application.Current.MainPage = new NoteListPage(); }