TreeDataGrid ships with two theme entry files:
Themes/Generic.axamlThemes/Fluent.axamlFor Fluent applications, include Fluent theme and TreeDataGrid Fluent styles:
<Application.Styles>
<FluentTheme/>
<StyleInclude Source="avares://Avalonia.Controls.TreeDataGrid/Themes/Fluent.axaml"/>
</Application.Styles>
Fluent.axaml includes Generic.axaml, then overrides selected resource keys with Fluent system colors.
In source, this is implemented via StyleInclude Source="/Themes/Generic.axaml"
inside Fluent.axaml.
This means:
Both files define Default and Dark dictionaries for TreeDataGrid keys.
Key groups include:
Generic.axaml defines ControlTheme entries for:
TreeDataGridTreeDataGridColumnHeaderTreeDataGridRowTreeDataGridCheckBoxCellTreeDataGridExpanderCellTreeDataGridTextCellTreeDataGridTemplateCellIt also defines a keyed ToggleButton theme for the expander chevron.
The templates use DynamicResource for most override points (TreeDataGrid...Brush keys), so app-level overrides propagate without replacing full control themes.
Header/cell colors do not change after overriding key
Cause: wrong key name or override is defined in an unreachable resource scope.
Fix: verify exact key spelling and move override to Application.Resources to confirm reachability.
Theme looks incomplete
Cause: Grid is loaded without TreeDataGrid style include.
Fix: include TreeDataGrid Fluent.axaml or Generic.axaml explicitly.