private async void DeleteBarButtonClick(object sender, RoutedEventArgs e) { DeleteAppBarButton.Visibility = Visibility.Collapsed; ViewModel1.RemoveListItem(ViewModel1.SelectedItem); ViewModel1.SelectedItem = null; Assignment(); TileService.UpdateTile(); ToastService.DeleteNotify(); await new MessageDialog("Delete successfully!").ShowAsync(); }
private async void MenuFlyoutDelete_Click(object sender, RoutedEventArgs e) { ViewModel1.SelectedItem = (sender as MenuFlyoutItem).DataContext as ListItem; ViewModel1.RemoveListItem(ViewModel1.SelectedItem); await new MessageDialog("Delete successfully!").ShowAsync(); Frame rootFrame = Window.Current.Content as Frame; rootFrame.Navigate(typeof(MainPage)); }