[Silverlight 2, C#] How to tell if a Storyboard is currently running?

To do this you can check the current ClockState of the animation.

bool isRunning = (MyStoryboard.GetCurrentState() == ClockState.Active);


Tags: ,
This entry was posted on Thursday, October 29th, 2009 at 1:30 pm and is filed under Silverlight, c#. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

2 Responses to “[Silverlight 2, C#] How to tell if a Storyboard is currently running?”

  1. John

    Yeah, I don’t like that fact that you have to poll it manually though. I’m hoping they add some events into the Storyboard class in SL4.0 (StoryboardStopped, StoryboardStarted, etc…)

  2. admin

    You can listen to the Storyboard “Completed” event, but I think that’s about it; having more events to listen to would be helpful for sure :)

Leave a Reply

Your comment