Skip to main content
Home Forums Silverlight Programming Programming with JavaScript Image rollover on mousenter and mouseleave event
2 replies. Latest Post by Winxnet on October 20, 2009.
(0)
Sony india
Member
0 points
1 Posts
08-22-2009 9:52 PM |
Hi,
I am having problem with image rollover in silverlight application. given image x:name and added mouse enter event handler in xaml. can any one please tell me how to write the code in code behind of xaml.cs file. in other forums everybody mentioned in html tags like that...but i need in xaml code behind.
or
how to write the java script function for the image roll over and how to call that function in xaml code behind? tried few ways but throwing errors ...
please anybody help me in this with the code...(javascript function) and calling that in xaml code behind file.
i tried out:- by calling
htmlpage.windows.invoke("") for the javascript function but still throwing errors...plspls help me in this...
thanks in advance..have a great day.
isanam
85 points
30 Posts
08-24-2009 6:14 AM |
Are you using any of the standard IDEs for Silverlight development? (Expression blend or visual studio). These tools will reduce lot of your work and do many anythings for you automatically.
If you are using expression blend to create user interface design then you can do it through the events panel for the selected image.
Select the image in design view of XAML. On right hand side you will get to see event's panel which lists down all possible events like rollover. Type name of a function that you want call on the specific event. Press enter, now if you have visual studio installed. The code behind file will automatically get opened in VS and there you can edit it.
But if you are already using VS for editing your SL application then it should be quite simple to find the code behind file and add necessary events functions.
Winxnet
2 points
10-20-2009 1:39 PM |
In blend 3 there does not appear to be a "rollover" event. There is however a "mouseenter" and "mouseleave" event.