示例#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);
            await new MessageDialog("Delete successfully!").ShowAsync();
            Frame rootFrame = Window.Current.Content as Frame;

            rootFrame.Navigate(typeof(MainPage));
        }