|  | 
| How to change image source on mouseover? | 
| Post Reply   | 
| Author | |
| miguel.domingues   Newbie   Joined: 08 July 2013 Status: Offline Points: 3 |  Post Options  Thanks(0)  Quote  Reply  Topic: How to change image source on mouseover? Posted: 26 March 2014 at 8:22pm | 
| How to change the image source on mouseover (rollover effect)?  This example is not working:     <Style x:Key="CloseButtonStyle" TargetType="Border"><Border Style="{StaticResource CloseButtonStyle}"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Trigger.Setters> <Setter Property="Image.Source" Value="file://C:\img_over.png"/> </Trigger.Setters> </Trigger> </Style.Triggers> </Style> <Image Cursor="Hand" Width="22" Height="22" Source="file://C:\img.png"/> </Border> | |
|  | |
| miguel.domingues   Newbie   Joined: 08 July 2013 Status: Offline Points: 3 |  Post Options  Thanks(0)  Quote  Reply  Posted: 27 March 2014 at 1:52pm | 
| 
   
I've discovered myself!   the solution is:     <Style x:Key="CloseButtonStyle" TargetType="Border">       <Setter Property="Source" Value="file://C:\img_over.png"/><Border> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Trigger.Setters> <Setter Property="Source" Value="file://C:\img_over.png"/> </Trigger.Setters> </Trigger> </Style.Triggers> </Style> <Image Cursor="Hand" Width="22" Height="22" Style="{StaticResource CloseButtonStyle}"> </Border> | |
|  | |
| wywty   Newbie   Joined: 28 April 2014 Status: Offline Points: 4 |  Post Options  Thanks(0)  Quote  Reply  Posted: 26 May 2014 at 12:04am | 
|   | |
|  | |
| wywty   Newbie   Joined: 28 April 2014 Status: Offline Points: 4 |  Post Options  Thanks(0)  Quote  Reply  Posted: 26 May 2014 at 12:34am | 
| 
   <Image Source='res://#137'/>
    | |
|  | |
| Post Reply   | |
| Tweet | 
| Forum Jump | Forum Permissions  You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |