Skip to main content
Home Forums Silverlight Programming Programming with .NET - General trigger function from button template
1 replies. Latest Post by bryant on September 30, 2009.
(0)
cdubone
Member
187 points
224 Posts
09-30-2009 6:43 PM |
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?
bryant
Star
9937 points
1,629 Posts
09-30-2009 7:01 PM |
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.