[]
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.
public interface IGradientStops : IEnumerable
Public Interface IGradientStops
Inherits IEnumerable
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);
| 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. |
| 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 |