Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check the status of a storyboard?

How would I check the status of a storyboard?

Example:

if (storyboard.Completed += true) // ???
{
}

(This code does not work, for obvious reasons.)

like image 523
JavaAndCSharp Avatar asked Apr 14 '11 01:04

JavaAndCSharp


2 Answers

Just hook the Completed event and when your code runs in there, the storyboard will have been completed. See: http://msdn.microsoft.com/en-us/library/system.windows.media.animation.timeline.completed(VS.95).aspx#Y565

like image 136
Todd Main Avatar answered Sep 20 '22 10:09

Todd Main


how about creating a boolean variable (e.g. IsCompleted) and set it to true in the Completed callback?

like image 24
Justin XL Avatar answered Sep 20 '22 10:09

Justin XL