Link Color Gradient

I need to show a path through a Go Diagram. Different links may be walked multiple times, and I would like to show a color difference on the link indicating how many times it has been crossed.

Any examples, or suggestions?

Best I can think of is to have an array of colors and change the link color based on number of traversals.


Yes, it’s trivial to change the color of a link. You can either use an array of predefined colors, or you can compute the color dynamically, using Color.FromArgb.

If you really want to have the link show multiple colors simultaneously, say blue at one end and red at the other end, you can use the GradientColorLink example class in the Demo1 sample.