Here is the code of XAML:
<Page.Resources>
<Style x:Key="cells" TargetType="GridViewColumnHeader">
<Style.Triggers>
<Trigger Property="IsEnabled" Value="True">
<Setter Property="Background" Value="#FF00B9FF"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="BorderBrush" Value="#FF00B9FF"></Setter>
<Setter Property="Padding" Value="8"></Setter>
<Setter Property="MinWidth" Value="100"></Setter>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#FF00B9FF"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="BorderBrush" Value="#FF00B9FF"></Setter>
<Setter Property="Padding" Value="2"></Setter>
<Setter Property="MinWidth" Value="100"></Setter>
</Trigger>
</Style.Triggers>
</Style>
</Page.Resources>
<Grid>
<Label Content="Notifications" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="20"></Label>
<ListView Background="{x:Null}" FontSize="17" Margin="0,30,0,0" ItemsSource="{Binding Notifications}" HorizontalAlignment="Center" BorderBrush="{x:Null}">
<ListView.View>
<GridView AllowsColumnReorder="False">
<GridViewColumn Header="Sl No." DisplayMemberBinding="{Binding Slno}" HeaderContainerStyle="{StaticResource cells}"></GridViewColumn>
<GridViewColumn Header="Message" DisplayMemberBinding="{Binding Message}" HeaderContainerStyle="{StaticResource cells}"></GridViewColumn>
<GridViewColumn Header="Date" DisplayMemberBinding="{Binding Date}" HeaderContainerStyle="{StaticResource cells}"></GridViewColumn>
</GridView>
</ListView.View>
</ListView>
</Grid>
The IsEnabled trigger is fine but the IsMouseOver trigger does not work. I tried to use the ControlTemplate but there is no property for <GridViewColumn/> and returns an error Cannot convert ControlTemplate type to DataTemplate or Style.
I am trying to change the style of my Grid Header, when on MOuseOver the default template is showing.
How can i override the style?