[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ILinearGradient.ColorStops

ColorStops Property

ColorStops

Gets the IColorStops for the ILinearGradient object.

Use the returned collection to access or add the color stops that define the linear gradient transition.

Declaration
IColorStops ColorStops { get; }
ReadOnly Property ColorStops As IColorStops
Examples
IRange range = worksheet.Range["A1"];
range.Interior.Pattern = Pattern.LinearGradient;
ILinearGradient gradient = (ILinearGradient) range.Interior.Gradient;
IColorStops colorStops = gradient.ColorStops;
colorStops.Add(0).Color = Color.Red;
bool hasRed = Enumerable.Range(0, colorStops.Count).Any(i => colorStops[i].Color.ToArgb() == Color.Red.ToArgb());