Wait for all WPF animations to stop
        Posted  
        
            by Ray
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Ray
        
        
        
        Published on 2010-04-11T04:58:50Z
        Indexed on 
            2010/04/11
            5:03 UTC
        
        
        Read the original article
        Hit count: 285
        
Given a WPF window, which may or may not have animations, I'd like to wait until they are all done before continuing processing. Is there a generic way to do this. Currently I can do something like this:
void WaitForAnimation(Storyboard storyboard)
{
    WaitUntil(() => storyboard.GetCurrentState() == ClockState.Stopped);
}
But this assumes I know the storyboards or have some way of finding them. Is there a way of doing that?
© Stack Overflow or respective owner