NativeExcel2 for .Net Developer's Reference

IInterior.PatternColor Property

Gets or sets the color of the interior pattern as a System.Drawing.Color value.

[Visual Basic]
PropertyPatternColorAsColor
[C#]
ColorPatternColor{get;set;}
[C++]
__propertyColorget_PatternColor();
__propertyvoidset_PatternColor(Color);
[JScript]
functiongetPatternColor():Color
functionsetPatternColor(Color);

Property Value

System.Drawing.Color The color of the specified interior pattern.

Example

This example sets the color of the interior pattern for the range A1:C10 on sheet one.

[C#]
IInterior interior = book.Worksheets[1].Cells["A1:C10"].Interior;
interior.Pattern = XlPattern.xlChecker;
interior.PatternColor = System.Drawing.Color.Yellow;
[VisualBasic]
Dim interior As IInterior = book.Worksheets(1).Cells("A1:C10").Interior
interior.Pattern = XlPattern.xlChecker
interior.PatternColor = System.Drawing.Color.Yellow
[C++]
IInterior* interior = book->Worksheets->Item[1].Cells->Item[S"A1:C10"]->Interior;
interior->Pattern = XlPattern::xlChecker;
interior->PatternColor = System::Drawing::Color::Yellow;

See Also

IInterior Interface | NativeExcel Namespace | Interior Property | PatternColorIndex Property