We're using Actipro PropertyGrid (v25.1.x) with WPF and need to hide categories that become empty after filtering.
Setup:
<grids:PropertyGrid IsFilterActive="True">
<grids:PropertyGrid.DataFilter>
<apshared:DataFilterGroup>
<grids:PropertyModelStringFilter Source="Name" Operation="NotEquals" Value="ConnectionString" />
<grids:PropertyModelStringFilter Source="Name" Operation="NotEquals" Value="FilePath" />
<!-- etc. - excluding specific properties by name -->
</apshared:DataFilterGroup>
</grids:PropertyGrid.DataFilter>
</grids:PropertyGrid>
Problem:
When DataFilter excludes all properties in a category (e.g., "Required"), the category header remains visible as an empty expander. We expected categories with no visible children to be hidden
automatically.
What we tried:
1. Code-behind approach: Listening to ItemContainerGenerator.StatusChanged, iterating over ICategoryModel items, checking children against the filter, and setting container.Visibility =
Collapsed on empty categories - no effect
2. XAML ItemContainerStyle with triggers - broke category display
Question:
Is there a built-in way to automatically hide empty categories when filtering, or what is the recommended approach in v25.x? The forum mentions "Filters QuickStart" should hide parent
categories, but this doesn't appear to work with PropertyModelStringFilter.