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); ViewModel1.SelectedItem = null; Assignment(); TileService.UpdateTile(); ToastService.DeleteNotify(); await new MessageDialog("Delete successfully!").ShowAsync(); }
private async void DeleteBarButtonClick(object sender, RoutedEventArgs e) { DeleteAppBarButton.Visibility = Visibility.Collapsed; MainPage.ViewModel1.RemoveListItem(MainPage.ViewModel1.SelectedItem); MainPage.ViewModel1.SelectedItem = null; Frame rootFrame = Window.Current.Content as Frame; rootFrame.Navigate(typeof(MainPage)); TileService.UpdateTile(); ToastService.DeleteNotify(); await new MessageDialog("Delete successfully!").ShowAsync(); }