Why would that work:
<Style x:Key="myHeaderStyle" TargetType="{x:Type GridViewColumnHeader}">
<Setter Property="Background" Value="LightBlue"/>
</Style>
And not this?
<ListView.View>
<GridView>
<GridView.ColumnHeaderContainerStyle>
<Style>
<Setter Property="Background" Value="Orange" />
</Style>
</GridView.ColumnHeaderContainerStyle>
...
thanks
You need to set the
TargetTypeproperty on the Style or the parser won’t know how to resolveBackground:It’s also possible to qualify the property name in the Setter:
but that syntax is intended for attached properties.