Skip to content

Infragistics Community Forum / Desktop / Ultimate UI for WPF / XamTreeGrid: customize dimmed ancestor/descendant opacity

XamTreeGrid: customize dimmed ancestor/descendant opacity

New Discussion
Jakub Mirota
Jakub Mirota asked on Oct 6, 2026 10:45 AM

We 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.

Sign In to post a reply

Replies

  • 1
    Andrew Goldenbaum
    Andrew Goldenbaum answered on Oct 6, 2026 2:40 PM Verified

    Hello Jakub,

    I have been investigating the behavior you are reporting, and unfortunately the best thing I can recommend at this time is essentially what you are currently doing.

    Since the Trigger for the Opacity control is within the ControlTemplate.Triggers, this unfortunately makes it necessary that the entire ControlTemplate is kept local as if you were to write a Style based on the RoyalLight DataRecordPresenter style and add a Trigger to the Style.Triggers collection, it would essentially just stack with the existing Trigger in the ControlTemplate.Triggers collection. Also, since WPF only keeps a single local style per control, there is no way to essentially “only” target a single Trigger.

    At this time, there is no theming resource to control this, but I feel that there should be and it would not be a difficult thing to create. As such, I am going to log a feature request / development item for this so that one is potentially developed in a future version of the Infragistics for WPF toolset so that this should be as simple as a single line of code via a Style resource.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew Goldenbaum
    Software Developer – Team Lead
    Infragistics

  • 0
    Jakub Mirota
    Jakub Mirota answered on Oct 8, 2026 11:15 AM

    Hello,

    Thank you for investigating this and for the detailed explanation.

    I’m glad to hear you’ve logged a feature request. Having the filtered ancestor/descendant opacity exposed through a theme resource or style property would make this scenario much easier to maintain across theme updates and Infragistics upgrades.

    For now, we’ll continue using the copied DataRecordPresenter template as a workaround.

    Thanks again for looking into this and for submitting the enhancement request.

    Regards,
    Jakub

  • 0
    Oriadan Isiowyn
    Oriadan Isiowyn answered on Oct 31, 2026 8:09 AM

    I ran into the exact same issue trying to keep our custom theme maintainable. Since overriding DataRecordPresenter completely is currently the only workaround, did you notice any performance impact on large datasets when using the custom template?

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Jakub Mirota
Favorites
0
Replies
3
Created On
Oct 06, 2026
Last Post
1 week, 5 days ago

Suggested Discussions

Tags

No tags

Created by

Created on

Oct 6, 2026 10:45 AM

Last activity on

Oct 6, 2026 10:45 AM