private void InitializeFilters()
        {
            filters = new ObservableCollection <FilterObject>(FiltersHelper.GetFiltersObjects());
            filtersCollectionView = (CollectionView)CollectionViewSource.GetDefaultView(filters);
            filtersCollectionView.GroupDescriptions.Add(new PropertyGroupDescription(nameof(FilterObject.Stage)));

            selectedFilters = new ReactiveList <FilterObject>();
            selectedFilters.Changed.Subscribe(x =>
            {
                if (SelectedNote == null || SelectedNote.Settings == null)
                {
                    return;
                }

                if (x.Action == NotifyCollectionChangedAction.Add)
                {
                    var addedItems = x.NewItems.OfType <FilterObject>();

                    if (addedItems != null)
                    {
                        foreach (var addedItem in addedItems)
                        {
                            if (!SelectedNote.Settings.SelectedFilters.Any(f => f.Filter == addedItem.Filter))
                            {
                                SelectedNote.Settings.SelectedFilters.Add(addedItem);
                            }
                        }
                    }
                }
                else if (x.Action == NotifyCollectionChangedAction.Remove)
                {
                    var removedItems = x.OldItems.OfType <FilterObject>();

                    if (removedItems != null)
                    {
                        foreach (var removeItem in removedItems)
                        {
                            var itemToRemove = SelectedNote.Settings
                                               .SelectedFilters
                                               .FirstOrDefault(f => f.Filter == removeItem.Filter);

                            if (itemToRemove != null)
                            {
                                SelectedNote.Settings.SelectedFilters.Remove(itemToRemove);
                            }
                        }
                    }
                }

                RaiseFilterBasedPropertyChanged();
            });

            selectedFiltersCollectionView = (CollectionView)CollectionViewSource.GetDefaultView(selectedFilters);
            selectedFiltersCollectionView.GroupDescriptions.Add(new PropertyGroupDescription(nameof(FilterObject.Stage)));
        }
        public SetFilterValueViewModel()
        {
            filtersDictionary = FiltersHelper.GetFiltersObjects().ToDictionary(x => x.Filter, x => x.Description);

            SaveCommand = ReactiveCommand.Create(() =>
            {
                OnSaveAction?.Invoke();
                FinishInteraction?.Invoke();
            });

            CancelCommand = ReactiveCommand.Create(() =>
            {
                OnCancelAction?.Invoke();
                FinishInteraction?.Invoke();
            });
        }