Skip to main content

XlFill.ForeColor Property

Gets or sets the foreground color of the cell pattern fill.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v24.2.Core.dll

Declaration

public XlColor ForeColor { get; set; }

Property Value

Type Description
XlColor

An XlColor value that specifies the pattern color.

Remarks

Use the XlFill.SolidFill and XlFill.PatternFill methods to fill the cell background using a solid color or a repeated pattern, respectively. The ForeColor property allows you to control the pattern color. You can also use the XlFill.PatternType and XlFill.BackColor properties to change the style and background color of the cell fill pattern.

When a solid fill is applied to a cell background (the XlFill.PatternType property is set to XlPatternType.Solid), the ForeColor is the only color rendered, even when the background color (XlFill.BackColor) is also specified.

For more information on how to set the background characteristics of a cell, refer to the How to: Change Cell Background Color example.

See Also