Version

CreatePatternFill(WorkbookColorInfo,WorkbookColorInfo,FillPatternStyle) Method

Creates a solid color or pattern fill that can be applied to a cell.
Syntax
'Declaration
 
Public Overloads Shared Function CreatePatternFill( _
   ByVal backgroundColorInfo As WorkbookColorInfo, _
   ByVal patternColorInfo As WorkbookColorInfo, _
   ByVal patternStyle As FillPatternStyle _
) As CellFillPattern

Parameters

backgroundColorInfo
A WorkbookColorInfo which describes the background color of the cell, which will only be seen if the patternStyle is not None.
patternColorInfo
A WorkbookColorInfo which describes the pattern color of the cell, which will only be seen if the patternStyle is not None or Solid.
patternStyle
The fill pattern for the cell.
Exceptions
ExceptionDescription
System.ComponentModel.InvalidEnumArgumentExceptionpatternStyle is Default or not defined in the FillPatternStyle enumeration.
Remarks

backgroundColorInfo and patternColorInfo can be specified as null to use the default colors.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also