private async void OnDelete() { // MP! fixme: not yet implemented //ShellViewModel.Current.EnableView(false); bool?result = await _userNotificationService.ConfirmationDialogAsync("Confirm Delete", "Ok", "Cancel"); //if (await DialogBox.ShowAsync("Confirm Delete", "Are you sure you want to delete selected items?", "Ok", "Cancel")) if (result == true) { _cancelOnSelectionChanged = true; try { var selectedItems = Items.Where(r => r.IsSelected).ToArray(); foreach (var item in selectedItems) { await DataProvider.DeleteItemAsync(item); Items.Remove(item); BarItems.Remove(item); } SelectionMode = ListViewSelectionMode.None; Mode = GridCommandBarMode.Idle; if (selectedItems.Length == 1) { var item = selectedItems[0]; // MP! fixme: not yet implemented //ToastNotificationsService.Current.ShowToastNotification(Constants.NotificationDeletedItemTitleKey.GetLocalized(), item); } } catch (Exception ex) { //await DialogBox.ShowAsync("Error deleting files", ex); await _userNotificationService.MessageDialogAsync("Error deleting files:", ex.Message); } _cancelOnSelectionChanged = false; } // MP! fixme: not yet implemented //ShellViewModel.Current.EnableView(true); IsCommandBarOpen = false; UpdateCommandBar(); }