The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
Row

Formatting.Fill Property

Provides access to cell background.

Namespace: DevExpress.Spreadsheet

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

Declaration

Fill Fill { get; }
ReadOnly Property Fill As Fill
Fill Fill { get; }
ReadOnly Property Fill As Fill
Fill Fill { get; }
ReadOnly Property Fill As Fill

Property Value

Type Description
Fill

A Fill object providing properties to change cell background characteristics.

Property Value

Type Description
Fill

A Fill object providing properties to change cell background characteristics.

Property Value

Type Description
Fill

A Fill object providing properties to change cell background characteristics.

Remarks

Use properties of the Fill object to customize the cell background. For example, you can fill cells with solid colors (Fill.BackgroundColor, CellRange.FillColor), shade cells with patterns (Fill.PatternType, Fill.PatternColor) or apply gradient effect (Fill.Gradient).

Spreadsheet_CellColors

Examples

This example demonstrates how to format color characteristics (font and background colors) for an individual cell and range of cells.

// Format an individual cell.
worksheet.Cells["A1"].Font.Color = Color.Red;
worksheet.Cells["A1"].FillColor = Color.Yellow;

// Format a range of cells.
CellRange range = worksheet.Range["C3:D4"];
Formatting rangeFormatting = range.BeginUpdateFormatting();
rangeFormatting.Font.Color = Color.Blue;
rangeFormatting.Fill.BackgroundColor = Color.LightBlue;
rangeFormatting.Fill.PatternType = PatternType.LightHorizontal;
rangeFormatting.Fill.PatternColor = Color.Violet;
range.EndUpdateFormatting(rangeFormatting);
See Also