Skip to main content

Microsoft Silverlight

is it possible to call multiple functions on same event like, is it possible MouseEnter="onMouseEnter;onMouseClicked" ?RSS Feed

(0)

suyog kale
suyog kale

Member

Member

188 points

99 Posts

is it possible to call multiple functions on same event like, is it possible MouseEnter="onMouseEnter;onMouseClicked" ?

 can anybody tell me in urgents

is it possible to call multiple functions on same event like

is it possible MouseEnter="onMouseEnter;onMouseClicked"  ?

please reply with solution 

(If this has answered your question, please click on "Mark as Answer")
Thanks & Rgds,
Suyog Kale
Senior Software Engineer
************************************************************

jasonxz
jasonxz

Participant

Participant

1750 points

529 Posts

Re: is it possible to call multiple functions on same event like, is it possible MouseEnter="onMouseEnter;onMouseClicked" ?

I don't believe there is any way to do it declaratively in your XAML.  However, I know that in 1.1, you can wire multiple methods to a single event in the code-behind:

object.MouseLeftButtonUp += new MouseEventHandler(method1);

object.MouseLeftButtonUp += new MouseEventHandler(method2);

So, I imagine you can probably do the same thing in javascript in 1.0.

Dave Britton
Dave Bri...

Member

Member

681 points

229 Posts

Re: is it possible to call multiple functions on same event like, is it possible MouseEnter="onMouseEnter;onMouseClicked" ?

 Yes - You can simply add multiple delagates as follows:

var media = rootElement.findname("media");

media.addEventListener("MediaEnded", Silverlight.createDelegate(this, this.handleMediaEnded));

media.addEventListener("MediaEnded", Silverlight.createDelegate(this, this.handleMediaEnded2));

 - Dave

Senior Engineer/Dev Manager, Vertigo Software
Vertigo
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities