开发者

How to Animate a Gradient on a Path to visualize data flow in WPF/WCF app

开发者 https://www.devze.com 2022-12-24 06:23 出处:网络
I have an interesting project where several \"nodes\" on a cnavas are connected via a Path similiar to a mindmap tree.

I have an interesting project where several "nodes" on a cnavas are connected via a Path similiar to a mindmap tree. The path is used to visualize the connection state 开发者_高级运维between two nodes. Red means the nodes are disconnected, green means they're connected. The next step would be to illustrate data flow (from A to B or B to A) using that path and an animation. Basically I would want to start the animation with the data transfer and stop it when the transfer is complete. Does anyone know how this could be done in WPF?


MSDN has an example of animating the stops on a gradient: http://msdn.microsoft.com/en-us/library/ms748815.aspx


Charles Petzold has a good article on making gradients run along paths. I'm not sure how easy it would be to animate though.

0

精彩评论

暂无评论...
验证码 换一张
取 消