Search code examples
c#wpfshapeskinectpolyline

How to animate polyline points using doubleanimation / pointanimation


Assuming I have a Polyline and I wish to move only the end of the Polyline from A to B using animation. How should I go about doing it?

p/s: I'll still prefer if the suggestion is for polyline and not for other controls such as path and so on :)

enter image description here


Solution

  • Not possible out of the box as far as I'm aware, since you're trying to animate a Point within a PointCollection. What you really need is a PointCollectionAnimation, which WPF doesn't provide. However, the awesome Charles Petzold wrote this article some time ago showing you how you can go about it.