954,529 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Image fade transition

Hello guys!
I've started a new app that I need to fade two images. One of them will be the background and other will fade-in on mouse hover and fade-out on mouse left. After some search around the internet, I didn't found anything that I could use. Can you guys give me some help?

And I need nome more thing. I want to have faded borders on some images, top and bottom to be more precise. There is some way to apply a mask to the images so when I scoll them up and down their borders will look faded? If my explanation don't help, I can post an example image.

Thanks in advance!

RenanLazarotto
Posting Whiz in Training
247 posts since Nov 2010
Reputation Points: 16
Solved Threads: 10
 

hi..

you can go for Javascript ...

kamilacbe
Junior Poster in Training
77 posts since Jun 2010
Reputation Points: 10
Solved Threads: 10
 

Inside C#? I don't see how this gonna work, and I would need to learn another programing language just for this. There's must be another way. :)

RenanLazarotto
Posting Whiz in Training
247 posts since Nov 2010
Reputation Points: 16
Solved Threads: 10
 

Post the image. What control are you using to show the picture? Most controls have a mouse enter and mouse leave event you can subscribe to, which you could use to trigger a timer or something to handle your fading.

skatamatic
Posting Shark
959 posts since Nov 2007
Reputation Points: 403
Solved Threads: 129
 

I'm using the standard picture box control, I just need to make the fade transition.

Here's the image:
[IMG]http://i.imgur.com/2bVC9.jpg[/IMG]
As you can see, its bottom is a fading green, which would mean that there's something more below it. So, as soon as I scroll down, when I reach the end of the image, that fade would dissapear. Also, as soon as I scroll down and it hide some image on the top, the fade would appear there too. Maybe I can to that overlaying one picturebox with another?

RenanLazarotto
Posting Whiz in Training
247 posts since Nov 2010
Reputation Points: 16
Solved Threads: 10
 

Someone to help?

RenanLazarotto
Posting Whiz in Training
247 posts since Nov 2010
Reputation Points: 16
Solved Threads: 10
 

So, personally, I think you should have two further picture boxes on top of your main picture box for the "more image" notification.

The fade can be controlled using the transparency or alpha level. 255 being opaque and 0 being transparent.

Have this set to a relevant level depending on your scroll position.


The maths behind it is for you to decide =)

Ketsuekiame
Master Poster
752 posts since May 2010
Reputation Points: 349
Solved Threads: 107
 

Hm... Interesting.
This seems to be the easiest solution. I'll try it, thanks!

RenanLazarotto
Posting Whiz in Training
247 posts since Nov 2010
Reputation Points: 16
Solved Threads: 10
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: