Пример #1
0
        public Tasks(TasksService tasksService)
        {
            _tasksService = tasksService;
            // prepare collections
            groupedWindows = CollectionViewSource.GetDefaultView(_tasksService.Windows);
            groupedWindows.GroupDescriptions.Add(new PropertyGroupDescription("Category"));
            groupedWindows.CollectionChanged += groupedWindows_Changed;
            groupedWindows.Filter             = groupedWindows_Filter;

            if (groupedWindows is ICollectionViewLiveShaping taskbarItemsView)
            {
                taskbarItemsView.IsLiveFiltering = true;
                taskbarItemsView.LiveFilteringProperties.Add("ShowInTaskbar");
                taskbarItemsView.IsLiveGrouping = true;
                taskbarItemsView.LiveGroupingProperties.Add("Category");
            }
        }
Пример #2
0
 public ApplicationWindow(TasksService tasksService, IntPtr handle)
 {
     _tasksService = tasksService;
     Handle        = handle;
     State         = WindowState.Inactive;
 }