Painting a trail over a Path in WPF

2019-07-27 12:01发布

问题:

I have a image moving around a complex path made up with multiple line segments. I want to draw over the path as if the image is leaving a 'snail trail' over the path, is there anyway I can do this ? I have looked at multiple examples of similar things but nothing is suitable yet. Thanks Image included as example :

回答1:

You can use Path Animations with MatrixTransform to achieve this motion. Depending on the content of your "Complex Path" you might then have multiple other StoryBoard's along the same animating path with different alpha values to thus give a trail effect.

Also have a look over at this SO Question for the above concept applied to a Path



标签: c# wpf animation