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?