[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IFillFormat.TwoColorGradient

TwoColorGradient Method

TwoColorGradient(GradientStyle, int)

Sets the specified fill to a two-color gradient.

Use this method to apply a gradient fill that blends between two colors. After calling this method, configure the gradient colors through the fill's color settings.

Declaration
void TwoColorGradient(GradientStyle style, int variant)
Sub TwoColorGradient(style As GradientStyle, [variant] As Integer)
Parameters
Type Name Description
GradientStyle style

The GradientStyle to apply.

int variant

The gradient variant. Valid values are from 1 through 4. If style is FromCenter, the value can only be 1 or 2.

Examples
IShape shape = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 20, 20, 100, 60);
IFillFormat fillFormat = shape.Fill;
fillFormat.TwoColorGradient(GradientStyle.Horizontal, 1);
fillFormat.Color.RGB = Color.Blue;