Back to Devexpress

GradientFill.Type Property

officefileapi-devexpress-dot-spreadsheet-dot-gradientfill.md

latest3.4 KB
Original Source

GradientFill.Type Property

Gets or sets the type of the gradient fill.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
GradientFillType Type { get; set; }
vb
Property Type As GradientFillType

Property Value

TypeDescription
GradientFillType

A GradientFillType enumeration member.

|

Available values:

NameDescription
Linear

Linear gradient. The background fill is a transition through a series of colors specified by color stops placed on a gradient line. The gradient line can be tilted at a specified angle.

| | Path |

Path gradient indicates that the transition boundary of one color to the next is a rectangle, defined by top, bottom, left, and right attributes.

|

Remarks

The picture below demonstrates the gradient fill of the GradientFillType.Linear type and the GradientFill.Degree property value set to 45.

The picture below demonstrates the gradient fill of the GradientFillType.Path type and the following convergence points:

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Type property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-spreadsheetcontrol-api-part-1/VB/SpreadsheetControl_WPF_API/SpreadsheetActions/FormattingActions.vb#L311

vb
fillA1.FillType = FillType.Gradient
fillA1.Gradient.Type = GradientFillType.Linear
' Set the tilt for the gradient line in degrees.

See Also

GradientFill Interface

GradientFill Members

DevExpress.Spreadsheet Namespace