I am building a 2-3-4 tree animator as a favor for one of my teachers.
I want to use animations to have the newest value traverse the tree to find where it goes and then insert the value into the node.
The problem comes when I have more than 1 level in the tree. I can get the new value to animate to the correct node, but it does it with a single diagonal movement instead of going to the root and then down.
There are 2 ways I can think of doing it but I have no idea how to implement either:
A - Calculate all the animations for the traversal up front, the play them one after the other.
B - Calculate a step of the traversal and play the animation immediately.
I can't find ANYTHING ANYWHERE on how to play a series of animations sequentially or how to force the code behind to wait for the animation to complete.
For the record, I am currently using the Storyboard.Complete event to chain certain animations, but traversing the tree is done in a while loop and that doesn't work so well (already tried it).