[]
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.
void TwoColorGradient(GradientStyle style, int variant)
Sub TwoColorGradient(style As GradientStyle, [variant] As Integer)
| Type | Name | Description |
|---|---|---|
| GradientStyle | style | The GradientStyle to apply. |
| int | variant | The gradient variant. Valid values are from 1 through 4. If |
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;