How to change the background image in button control template in wpf
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 ?
No comments:
Post a Comment