Class
GradientFill

Two-color gradient fill for cell backgrounds, blending between Color1 and Color2 along the specified direction.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

cs-api-definition
public class GradientFill : IFill

Inheritance: objectGradientFill

Implements: IFill

Constructors

GradientFill(GradientType, Color, Color)

Initializes a new GradientFill with the specified direction and explicit RGB colors.

Declaration

cs-api-definition
public GradientFill(GradientType gradientType, Color color1, Color color2)

Parameters

gradientType

GradientType

Type of the gradient.

color1

Color

The first color.

color2

Color

The second color.

GradientFill(GradientType, ThemableColor, ThemableColor)

Initializes a new GradientFill with the specified direction and theme-aware colors.

Declaration

cs-api-definition
public GradientFill(GradientType gradientType, ThemableColor color1, ThemableColor color2)

Parameters

gradientType

GradientType

Type of the gradient.

color1

ThemableColor

The first color.

color2

ThemableColor

The second color.

Properties

Color1

Gets the starting color in the gradient blend.

Declaration

cs-api-definition
public ThemableColor Color1 { get; }

Property Value

ThemableColor

The first color.

Color2

Gets the ending color in the gradient blend.

Declaration

cs-api-definition
public ThemableColor Color2 { get; }

Property Value

ThemableColor

The second color.

GradientType

Gets the gradient direction and pattern (Horizontal, Vertical, DiagonalUp, FromCenter, etc.).

Declaration

cs-api-definition
public GradientType GradientType { get; }

Property Value

GradientType

The type of the gradient.

Methods

Equals(object)

Determines whether the specified object is equal to the current object.

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

The object to compare with the current object.

Returns

bool

True if the specified object is equal to the current object; otherwise, false.

Overrides object.Equals(object)

GetHashCode()

Serves as a hash function for a particular type.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

Overrides object.GetHashCode()