I have a list of project dtos that contain a collection of tasks. On my ViewModel I have an ICollectionView for the projects so I can filter projects that are marked as done see below filter code.
public void FilterDoneItems()
{
if (this.MarkDone)
{
ProjectsViewSource.Filter = new Predicate<object>(FilterDone);
}
else
{
ProjectsViewSource.Filter = null;
}
}
This works fine for projects but I also want to filter out the done tasks. As the ProjectDTO encompases the Tasks (List) I can't wrap the tasks in an ICollectionView to filter them in the ViewModel.
I am unsure how best to go about filtering on the tasks as well can anyone help please?