Hi,
I think you are setting the
TargetProperty
wrong and you aren't setting the
TargetName
of the storyboard.
Instead of:
Storyboard.SetTargetProperty(InfExtraGrid, new PropertyPath(TranslateTransform.YProperty));
write:
Storyboard.SetTargetName(OnMouseLeave, "InfExtraGrid");
Storyboard.SetTargetProperty(OnMouseLeave, new PropertyPath("(Grid.RenderTransform).(TransformGroup.Children)[0].(TranslateTransform.Y)");
TargetName
and
TargetProperty
are attached properties of the animation instance (from
Storyboard
), in this instance the OnMouseLeave object,
so you have to set these properties on the OnMouseLeave and not the InfExtraGrid object.
Hope this helps,
Thomas.