![]() |
How to change image source on mouseover? |
Post Reply ![]() |
Author | |
miguel.domingues ![]() Newbie ![]() Joined: 08 July 2013 Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() 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 |
![]() ![]() ![]() ![]() ![]() |
I've discovered myself!
![]() <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 |
![]() ![]() ![]() ![]() ![]() |
![]() |
|
![]() |
|
wywty ![]() Newbie ![]() Joined: 28 April 2014 Status: Offline Points: 4 |
![]() ![]() ![]() ![]() ![]() |
<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 |