private async Task DeleteElement() { var element = SelectedIssue != null ? "задачу" : SelectedColumn != null ? "весь столбец" : "всю строку"; var ts = await dialogCoordinator.ShowMessageAsync(this, "Warning", $"Вы действительно хотите удалить {element}?" , MessageDialogStyle.AffirmativeAndNegative); if (ts == MessageDialogResult.Negative) { return; } if (SelectedIssue != null) { await scope.DeleteIssueAsync(SelectedIssue.Id); } else if (SelectedRow != null) { await scope.DeleteRowAsync(SelectedRow.Id); } else if (SelectedColumn != null) { await scope.DeleteColumnAsync(SelectedColumn.Id); } await RefreshContent(); }