private void AssignTask_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new ChooseItemWindow(_availableTasksToAdd.Cast <NamedHolder>().ToList());

            dialog.ShowDialog();
            if (dialog.SelectedHolder is TaskHolder taskToAdd)
            {
                _availableTasksToAdd.Remove(taskToAdd);
                ShownGroup.Tasks.Add(taskToAdd);
                taskToAdd.Groups.Add(ShownGroup);
            }
        }
        private void AssignToGroup_Click(object sender, RoutedEventArgs e)
        {
            var dialog = new ChooseItemWindow(_availableGroupsToAdd.Cast <NamedHolder>().ToList());

            dialog.ShowDialog();

            if (dialog.SelectedHolder is GroupHolder groupToAdd)
            {
                _availableGroupsToAdd.Remove(groupToAdd);
                ShownTask.Groups.Add(groupToAdd);
                groupToAdd.Tasks.Add(ShownTask);
            }
        }