Reputation: 29493
I am animating two RenderTransforms of elements in a programmatic way in C# by doing the following:
Storyboard.SetTargetProperty(shiftAnimation, new PropertyPath("RenderTransform.X"));
The problem is, now where I use two transforms, I needed to add a TransformGroup. But I cannot figure out how the path is accessed with it.
TransformGroup.RenderTransform.X
or anything similar does not work.
Upvotes: 1
Views: 2324
Reputation: 29493
One way would be:
new PropertyPath("RenderTransform.Children[0].X");
and
new PropertyPath("RenderTransform.Children[1].ScaleX");
Though this is kinda static with the hard coded index
Upvotes: 5