I am calling a Storyboard-Animation in my code like MyAnim.Begin();
But when I call that method again (say, when I click to do it again),
it interrupts the current running animation and starts from newly from the beginning.
Is there a way, to launch the same animation multiple times without interrupting each other?
I made an explosion effect and I want to let it explode over and over again.
The Storyboard object contains a completed event. This gets fired when the storyboard has finished running.
I’d suggest something like this:
private object _locker=new object();
private bool _isProcessing;
private int _waitingAnimations;
You’ll need to have a look at the arguments provided by the Completed event as I’m doing this from memory, but I’ve used this before and it does exactly what you’re looking to do.