Reputation: 1453
I want to make a progress bar with multiple colors with C#. For example it would have a maximum value of 15.
1-5 Red 5-7 Blue 7-8 Color3 8-12 Color4 etc
I've looked around but haven't found a lot on this topic.
Upvotes: 1
Views: 1935
Reputation: 33596
Check this article: http://www.silverlightshow.net/items/Red-To-Green-scale-using-an-IValueConverter.aspx There there's an example how to calculate a color depending on numeric value and how such converter may be used to color-code the "seriousness" of the value.
Even if you are not using WPF (I hope you are), the knowledge will surely be useful to you.
Upvotes: 1