[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IGradientStops

IGradientStops Interface

Represents a collection of IGradientStop objects.

Use this collection to access, add, and remove the gradient stops that define a gradient fill or line. Instances of this interface are typically obtained from APIs such as GradientStops.

Namespace: GrapeCity.Documents.Excel.Drawing
Assembly: DS.Documents.Excel.dll
Syntax
public interface IGradientStops : IEnumerable
Public Interface IGradientStops
    Inherits IEnumerable
Examples
IComment comment = worksheet.Range["A1"].AddComment("Gradient fill");
comment.Shape.Fill.TwoColorGradient(GradientStyle.Horizontal, 1);
IGradientStops gradientStops = comment.Shape.Fill.GradientStops;
gradientStops[0].Color.RGB = Color.FromArgb(255, 0, 0);
gradientStops[1].Color.RGB = Color.FromArgb(0, 0, 255);

Properties

Name Description
Count

Gets the number of gradient stops in this IGradientStops collection.

Each gradient stop defines a color transition point in a gradient fill or line.

this[int]

Gets the IGradientStop object at the specified index from this collection.

Methods

Name Description
Delete(int)

Removes the gradient stop at the specified index.

Use this method to remove a color transition point from the gradient definition.

Insert(int, double, double, int, double)

Adds a gradient stop with the specified color and position.

This overload forwards to Insert(int, double, double, int, double) with transparency set to 0, index set to -1, and brightness set to 0.