I wanted to change the background image on mouse over. But i could n't. below is my source code..
<Button.Template>
<ControlTemplate>
<Border HorizontalAlignment="Center" VerticalAlignment="Center">
<Image Source="../Resources/Images/refresh.png" Width="16" Height="16" />
</Border>
</ControlTemplate>
</Button.Template>
I tried with below code but it is not even compiling..
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Source" Value="../Resources/Images/refresh_Hover.png" />
</Trigger>
</ControlTemplate.Triggers>
Any help ?
You will have to give
x:Name
toImage
and in setter setTargetName
to the image name given. It should work.