I have some controls in a Canvas. I need to animate their Canvas.Top and Canvas.Left properties. I'm using a foreach where I start all the animation:
foreach (Control c in controls)
{
tc.BeginAnimation(Canvas.TopProperty, yAnimation);
tc.BeginAnimation(Canvas.LeftProperty, xAnimation);
}
where xAnimation and yAnimation are two DoubleAnimation. Everything works fine, but after animating these object I can't drag them anymore. I found here the reason and the solution (setting the final value inside the animation Complete event handler), but it doesn't seem to work for me: in my problem I have a bunch of objects, and in animation Completed event handler I have no way to get which object's animation ended. Any ideas?