Missing PART in the datagrid
the "PART_FillerColumnHeader" in not present in the template
Create a new projet with a datagrid, columns and parse the xaml = at the end of the headers, this PART is filling the rest of the header grid.
I was using this in my code to remove a custom filter control in the last part var filler = VisualHelper.FindChild<DataGridColumnHeader>(this, "PART_FillerColumnHeader");
you can also modify the header style to verify - below the original datagrid
<Style x:Key="DataGridColumnHeadersPresenterStyle1" TargetType="{x:Type DataGridColumnHeadersPresenter}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type DataGridColumnHeadersPresenter}"> <Grid> <DataGridColumnHeader x:Name="**PART_FillerColumnHeader**" IsHitTestVisible="False"/> <ItemsPresenter/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style>
Environment
MahApps.Metro version: v2.4.10 Target Framework: .Net Core 8