コード例 #1
0
        protected virtual void OnApplyExecute()
        {
            if (Items != null && Items.Any())
            {
                ApplyedFilters = Items
                                 .Where(x => x.SelectedValue != null)
                                 .Select(x => x.SelectedValue)
                                 .ToList();

                VmService.ChangeFiltersTo(_categoryId, ApplyedFilters);
            }

            Close(this);
        }
コード例 #2
0
        protected virtual void OnClearExecute()
        {
            ApplyedFilters = new List <ApplyedFilter>();

            Items?.ForEach(x => x.ClearSelectedValue());

            Messenger.Publish(new FiltersReloadWhenValueChangedMessage(this));

            if (Config.ApplyFiltersWhenClearingUp)
            {
                VmService.ChangeFiltersTo(_categoryId, ApplyedFilters);

                Close(this);
            }
        }