[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IColorStop

IColorStop Interface

Represents a gradient stop in a gradient fill for a range or selection.

Use this interface to read or change the color, theme color, tint/shade, and position of a single gradient stop in a linear or rectangular gradient. The position is a value from 0.0 to 1.0, where 0.0 represents the start of the gradient and 1.0 represents the end.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public interface IColorStop
Public Interface IColorStop
Examples
IRange range = worksheet.Range["A1"];
range.Interior.Pattern = Pattern.LinearGradient;

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

colorStops[0].Color = Color.Red;
colorStops[0].Position = 0.0;

colorStops[1].Color = Color.Blue;
colorStops[1].Position = 1.0;

Properties

Name Description
Color

Gets or sets the color of this gradient stop.

Use this property to read or change the direct color assigned to a gradient stop.

Position

Gets or sets the position of this gradient stop.

The position specifies where the gradient stop is placed in the gradient transition. The valid range is 0.0 to 1.0, where 0.0 represents the start of the gradient and 1.0 represents the end.

ThemeColor

Gets or sets the theme color of this gradient stop.

Use this property to read the theme color of a gradient stop, or to apply a workbook theme color to a gradient stop. If the gradient stop does not use a theme color, this property returns None.

TintAndShade

Gets or sets the tint and shade adjustment of this gradient stop.

Use a value from -1.0 to 1.0, where 0 means no adjustment, negative values make the color darker, and positive values make the color lighter.

Methods

Name Description
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.