[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IColorStops.Item

this Property

this[int]

Gets the IColorStop object at the specified index in the collection.

Declaration
IColorStop this[int index] { get; }
ReadOnly Default Property Item(index As Integer) As IColorStop
Parameters
Type Name Description
int index

The zero-based index of the gradient stop in the collection.

Examples
IRange range = worksheet.Range["A1"];
range.Interior.Pattern = Pattern.LinearGradient;

ILinearGradient gradient = (ILinearGradient) range.Interior.Gradient;
IColorStops colorStops = gradient.ColorStops;

IColorStop startStop = colorStops[0];
startStop.Color = Color.Red;

IColorStop endStop = colorStops[1];
endStop.Color = Color.Blue;