1

i want to add the animation for many object ,and i'm try this one Fill Ellipse with wave animation it work ,but i want to use it in the same page by many object, each object have different value , the point is how do i Set Reference Parameter by variable or something i can dyanmic setting

var waveOffsetYExpressionAnimation = _compositor.CreateExpressionAnimation("Lerp(135.0f, 0.0f, Value_" + i + ")");
waveOffsetYExpressionAnimation.SetReferenceParameter("Value_" + i, _percentPropertySet);
imageSurfaceBrush.StartAnimation("Offset.Y", waveOffsetYExpressionAnimation);
蔡議陞
  • 13
  • 1
  • 3
  • Do you mean you want to change the key of the SetReferenceParameter to store different percentPropertySet in order to let the objects have different value? It is not feasible. An object corresponds to an animation. So you need to create its composition for each object, like `Composition compositor = ElementCompositionPreview.GetElementVisual(ClippedImageContainer).Compositor;` instead of an animation corresponding to multiple objects. – Faywang - MSFT Oct 07 '19 at 06:01

0 Answers0