Skip to main content
Home Forums Silverlight Programming Programming with .NET - General check if animation played??
7 replies. Latest Post by cdubone on April 9, 2008.
(0)
cdubone
Member
187 points
224 Posts
04-07-2008 6:52 PM |
I'm wondering if there is a way to determine if an animation has just played. I'm making an accordion menu and I need to start the 'menu close' animation when the next button is pressed. In order to do this I have to determine which menu was clicked last. Thoughts?
y_makram
Contributor
6172 points
1,233 Posts
04-07-2008 7:00 PM |
There is no API specific for knowing if an animation has been played. So you need to use some form of variable to hold the last animated object and maintain it whenever your animation starts or completes.
BenHayat
Participant
1033 points
600 Posts
04-07-2008 7:26 PM |
cdubone:I'm wondering if there is a way to determine if an animation has just played. I'm making an accordion menu and I need to start the 'menu close' animation when the next button is pressed. In order to do this I have to determine which menu was clicked last. Thoughts?
I had asked the team to give us a "Completed" event many months ago and they said they might. So, let's ask them again.
My vote for a "Completed" event!
04-08-2008 2:45 PM |
Thanks for getting back to me Yasser and Ben!
I'm pretty surprised there isn't a 'Completed' event, that sure would be handy. I'm all for it. In the mean time I'll give the variable approach a try.
04-08-2008 4:40 PM |
There is a completed event for the Storyboard, but not for a single animation.
04-09-2008 1:19 PM |
I guess what I mean is 'has played' and not 'on completed'. For example if Storyboard1 'is at the end of its animation' then start Storyboard2 else start Storyboard3. Is something like this possible? Or am I still better off trying the variable approach?
04-09-2008 4:14 PM |
You need to use variables to track the running Storyboards.
04-09-2008 5:12 PM |
Cool, thanks!