Hello.
Would it be possible to help me with the following question:
I would like to have MinorTickmarks filled with gradient but in the following way: If I set gradient from Red to Green I want to see that 1-st MinorTickmark will be filled with Red and the last within Green color.
At the moment I am using the following code:
radialGaugeScale1.StartAngle = 160; radialGaugeScale1.EndAngle = 260; radialGaugeScale1.MinorTickmarks.EndExtent = 79; radialGaugeScale1.MinorTickmarks.Frequency = 0.2; radialGaugeScale1.MinorTickmarks.StartExtent = 75; radialGaugeScale1.MinorTickmarks.StartWidth = 2; simpleGradientBrushElement1.EndColor = System.Drawing.Color.Red; simpleGradientBrushElement1.StartColor = System.Drawing.Color.DarkRed; radialGaugeScale1.MinorTickmarks.BrushElements.Add(simpleGradientBrushElement1); numericAxis1.EndValue = 3.5; numericAxis1.TickmarkInterval = 0.5; radialGaugeScale1.Axes.Add(numericAxis1); radialGauge1.Scales.Add(radialGaugeScale1);
But this code creates gradient filling within each separate MinorTickmark and all my MinorTickmarks have the same color.
Looking forward to your answer.
Regards, A__L
I think for this task you will need to create your own BrushElement class. The BrushElement should create a PathGradientBrush which fills the circle with colors changing in an angular fashion, sort of like figure 2 here:
http://www.bobpowell.net/pgb.htm
Then you can set the MinorTickmarks to use this BrushElement. You will probably need to change the BrushElement each time the gauge control is resized, since the source bounds directly affect how such a brush is generated.
Alternatively, you can request this as a feature here: http://devcenter.infragistics.com/protected/requestfeature.aspx
Thanks for the reply.
That wasn't so easy as I excepted. :-(