[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IColorStop.Delete

Delete Method

Delete()

Deletes this gradient stop from the gradient fill.

After deleting a gradient stop, get the IColorStops collection from the gradient again before accessing the remaining gradient stops.

Declaration
void Delete()
Sub Delete()
Examples
IRange range = worksheet.Range["A1"];
range.Interior.Pattern = Pattern.LinearGradient;

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

IColorStop colorStop = colorStops[1];
colorStop.Delete();

IColorStops updatedColorStops =
    ((ILinearGradient) range.Interior.Gradient).ColorStops;
int count = updatedColorStops.Count;