Print Page | Close Window

How to change image source on mouseover?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: MarkupLabel Control
Forum Description: Topics Related to Codejock MarkupLabel Control
URL: http://forum.codejock.com/forum_posts.asp?TID=22255
Printed Date: 19 April 2024 at 7:57am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to change image source on mouseover?
Posted By: miguel.domingues
Subject: How to change image source on mouseover?
Date 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:%5Cimg_over.png/" rel="nofollow - 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:%5Cimg.png/" rel="nofollow - file://C:\img.png"/ >
    </Border>



Replies:
Posted By: miguel.domingues
Date 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:%255Cimg_over.png/" rel="nofollow - file://C:\img_over.png"/ >
      <Style.Triggers>
        <Trigger Property="IsMouseOver" Value="True">
          <Trigger.Setters>
            <Setter Property="Source" Value=" file:///C:%255Cimg_over.png/" rel="nofollow - file://C:\img_over.png"/ >
          </Trigger.Setters>
        </Trigger>
      </Style.Triggers>
    </Style>
    <Border>
        <Image Cursor="Hand" Width="22" Height="22" Style="{StaticResource CloseButtonStyle}">
    </Border>


Posted By: wywty
Date Posted: 26 May 2014 at 12:04am
Thumbs Up


Posted By: wywty
Date Posted: 26 May 2014 at 12:34am
<Image Source='res://#137'/>



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net