Hi
I'm trying to style the header of a listview depending on hover/pressed/etc. events.
So far I tried a few things such as a trigger like the following but this does not work on my machine (a Vista Ultimate x64)
<Style x:Key="GridViewColumnHeaderStyle1" TargetType="{x:Type GridViewColumnHeader}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" Value="Green"/>
</Trigger>
</Style.Triggers>
</Style>
And the listview code:
<ListView VerticalAlignment="Bottom" IsSynchronizedWithCurrentItem="True">
<ListView.View>
<GridView ColumnHeaderContainerStyle="{StaticResource GridViewColumnHeaderStyle1}" >
<GridViewColumn Header="abc"/>
<GridViewColumn Header="cde"/>
</GridView>
</ListView.View>
<ListView.DataContext>
<DataTemplate>
<ListViewItem Content="zxc"/>
</DataTemplate>
</ListView.DataContext>
</ListView>
The behaviour I expect is for the background of the header that I hover to become green.
Any ideas?
NT