Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit Help Please! VSM Storyboard Events not Firing
4 replies. Latest Post by WJamesLord on September 11, 2008.
(0)
WJamesLord
Member
138 points
118 Posts
09-11-2008 1:41 PM |
I'm trying to write my first custom control utilizing the VisualStateManager for events. The control displays properly, but the storyboards wired via VSM do not fire. Could someone please review this generic.xaml and tell me where I've gone wrong?
Thanks in advance for any help you can provide.
W James
</
lee_sl
Contributor
2992 points
585 Posts
09-11-2008 2:48 PM |
Are you sure the right template is being applied?
09-11-2008 3:22 PM |
It does indeed appear that the correct template is being loaded. The control is properly rendered. It's just that none of the events fire. Here's a snippet of the underlying custom control class.
[
{
,
}
SetText(Text);
09-11-2008 4:04 PM |
you should handle the mouseevents and do something like this in the event handler
VisualStateManager.GoToState(this, "mystate', true);
09-11-2008 4:22 PM |
I see. So I still have to manually wire up the events to the VSM state. I was under the impression that the events would auto-magically be wired.
My misunderstanding.