XamTreeGrid: customize dimmed ancestor/descendant opacity
New DiscussionWe are using XamTreeGrid in a WPF application targeting .NET 10, with the RoyalLight theme.
<igDp:XamTreeGrid Theme="RoyalLight">
<igDp:XamTreeGrid.FieldSettings>
<igDp:FieldSettings AllowRecordFiltering="True"
FilterOperatorDefaultValue="Contains" />
</igDp:XamTreeGrid.FieldSettings>
<igDp:XamTreeGrid.FieldLayoutSettings>
<igDp:FieldLayoutSettings FilterAction="Hide"
RecordFilterScope="AllRecords" />
</igDp:XamTreeGrid.FieldLayoutSettings>
<igDp:XamTreeGrid.ViewSettings>
<igDp:TreeViewSettings
FilterResultsDisplayMode="ShowWithAncestorsAndDescendants" />
</igDp:XamTreeGrid.ViewSettings>
</igDp:XamTreeGrid>
Issue:
Records that match the filter are displayed normally. Nonmatching ancestors and descendants remain visible, as expected, but their content is dimmed too much and becomes difficult to read.
For example, when filtering for “Matching device”:
Parent ← visible but too dim
└── Matching device ← normal appearance
└── Nonmatching child ← visible but too dim
We want to preserve this filtering behavior while making the contextual records more readable—for example, using an opacity of 0.7.
The dimming appears to be controlled by a hardcoded opacity setter in the DataRecordPresenter template, targeting PART_RecordContentSite when IsFilteredOut is True.
Working workaround
Copying the complete presenter template and changing/adding the following trigger works
<ControlTemplate.Triggers>
<!-- Other original template triggers remain unchanged. -->
<Trigger Property="IsFilteredOut" Value="True">
<Setter TargetName="PART_RecordContentSite"
Property="Opacity"
Value="0.7" />
</Trigger>
</ControlTemplate.Triggers>
However, maintaining a large copied template for one opacity change seems excessive and could make theme changes or Infragistics upgrades harder.
Questions
1. Is there a supported property, theme resource, or styling hook to configure the opacity of nonmatching ancestors and descendants?
2. Can we override only this filtering appearance while retaining the default DataRecordPresenter template?
3. If no XAML-only option exists, is an attached behavior recommended? Is there a better approach that safely handles virtualization, record recycling, and template changes?
Ideally, we would keep the default theme/template and customize only the contextual records’ opacity.