Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > MarkupLabel Control
  New Posts New Posts RSS Feed - How to change image source on mouseover?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to change image source on mouseover?

 Post Reply Post Reply
Author
Message
miguel.domingues View Drop Down
Newbie
Newbie


Joined: 08 July 2013
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote miguel.domingues Quote  Post ReplyReply Direct Link To This Post 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">
      <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>
    <Border Style="{StaticResource CloseButtonStyle}">
        <Image Cursor="Hand" Width="22" Height="22" Source="file://C:\img.png"/>
    </Border>
Back to Top
miguel.domingues View Drop Down
Newbie
Newbie


Joined: 08 July 2013
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote miguel.domingues Quote  Post ReplyReply Direct Link To This Post Posted: 27 March 2014 at 1:52pm
I've discovered myself! Smile
the solution is:
 
    <Style x:Key="CloseButtonStyle" TargetType="Border">
      <Setter Property="Source" Value="file://C:\img_over.png"/>
      <Style.Triggers>
        <Trigger Property="IsMouseOver" Value="True">
          <Trigger.Setters>
            <Setter Property="Source" Value="file://C:\img_over.png"/>
          </Trigger.Setters>
        </Trigger>
      </Style.Triggers>
    </Style>
    <Border>
        <Image Cursor="Hand" Width="22" Height="22" Style="{StaticResource CloseButtonStyle}">
    </Border>
Back to Top
wywty View Drop Down
Newbie
Newbie


Joined: 28 April 2014
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote wywty Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2014 at 12:04am
Thumbs Up
Back to Top
wywty View Drop Down
Newbie
Newbie


Joined: 28 April 2014
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote wywty Quote  Post ReplyReply Direct Link To This Post Posted: 26 May 2014 at 12:34am
<Image Source='res://#137'/>
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.