diff --git a/src/ManagedShell.WindowsTasks/Tasks.cs b/src/ManagedShell.WindowsTasks/Tasks.cs index 5b327a46..1deb5427 100644 --- a/src/ManagedShell.WindowsTasks/Tasks.cs +++ b/src/ManagedShell.WindowsTasks/Tasks.cs @@ -21,16 +21,7 @@ public Tasks(TasksService tasksService) public ICollectionView CreateGroupedWindowsCollection() { - ICollectionView collection; - if (groupedWindows == null) - { - collection = CollectionViewSource.GetDefaultView(_tasksService.Windows); - } - else - { - collection = new CollectionViewSource { Source = groupedWindows.SourceCollection }.View; - } - + ICollectionView collection = new ListCollectionView(_tasksService.Windows); collection.GroupDescriptions.Add(new PropertyGroupDescription("Category")); collection.CollectionChanged += groupedWindows_Changed; collection.Filter = groupedWindows_Filter;