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

Fill.PatternType Property

Gets or sets the cell background pattern.

Namespace: DevExpress.Spreadsheet

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

Declaration

PatternType PatternType { get; set; }
Property PatternType As PatternType
PatternType PatternType { get; set; }
Property PatternType As PatternType
PatternType PatternType { get; set; }
Property PatternType As PatternType

Property Value

Type Description
PatternType

A PatternType enumeration member that specifies the pattern for the cell shading. Default is None.

Property Value

Type Description
PatternType

A PatternType enumeration member that specifies the pattern for the cell shading. Default is None.

Property Value

Type Description
PatternType

A PatternType enumeration member that specifies the pattern for the cell shading. Default is None.

Remarks

To specify the cell background characteristics, use the Fill.BackgroundColor, PatternType and Fill.PatternColor properties of the Fill object.

By default, the PatternType property is set to PatternType.None. When you set the Fill.BackgroundColor property, the PatternType property value is automatically changed to PatternType.Solid.

To access the Fill object, use the Formatting.Fill property.

For examples on how to specify formatting for an individual cell and cell range or modify a style, refer to the How to: Format a Cell or Range of Cells or How to: Create or Modify a Style document.

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