Skip to main content

Microsoft Silverlight

Answered Question trigger function from button templateRSS Feed

(0)

cdubone
cdubone

Member

Member

187 points

224 Posts

trigger function from button template

Is there a way to trigger a function from a button template? I would like to trigger the function 'UnFocusAll()' every time the user hovers over a button that uses this control template.

I tried <Setter Property="MouseEnter" Value="UnFocusAll()" /> but that didn't work.

Is this possible? If so how?

Chris Williams

bryant
bryant

Star

Star

9937 points

1,629 Posts

Silverlight MVP
Answered Question

Re: trigger function from button template

You can't currently trigger code from a template like this (at least I don't know how). You'd have to either subclass to button or add a behavior to it. I just wrote a blog post on this subject here.

-- bryant

Blog | Twitter
_________________
Dont forget to click "Mark as Answer" on the post that helped you.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities