示例#1
0
 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();
 }
示例#2
0
 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();
 }
示例#3
0
        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();
        }