Hi,
I am trying to set this Style to my ListViewItems when the Mouse hover on them:(attched file)
Then,I did a Style when Mouse hover on every ListViewItem,but this Style changes the Background when Hover not the Foreground color ,this is my try
<ListView Name="myList">
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<ListViewItemPresenter
FocusSecondaryBorderBrush="#d9d7ec"
PlaceholderBackground="#d9d7ec"
PointerOverBackground="#d9d7ec"
PointerOverForeground="#342d65"
SelectedBackground="#d9d7ec"
SelectedForeground="#342d65"
SelectedPointerOverBackground="#d9d7ec"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Center"
Foreground="Gray" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListView.ItemContainerStyle>
</ListView>
and this is How I apply this Style to the ListView:
<ListView >
<ListView.ItemTemplate >
<DataTemplate>
<StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
<TextBlock x:Name="day" Text="{Binding Path=day}" Foreground="#797978">
</TextBlock>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate >
</ListView
So,please How can I change the Foreground color when Hover on ListViewItem
thanks for help