Share via


ChartFillFormat.BackColor Property

Returns or sets a ChartColorFormat object that represents the background color for the specified fill or patterned line. Read/write.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
ReadOnly Property BackColor As ChartColorFormat
    Get
'Usage
Dim instance As ChartFillFormat
Dim value As ChartColorFormat

value = instance.BackColor
ChartColorFormat BackColor { get; }

Property Value

Type: Microsoft.Office.Interop.PowerPoint.ChartColorFormat
ColorFormat

Examples

This example adds a rectangle to myDocument and then sets the foreground color, background color, and gradient for the rectangle's fill.

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddShape(msoShapeRectangle, _

        90, 90, 90, 50).Fill

    .ForeColor.RGB = RGB(128, 0, 0)

    .BackColor.RGB = RGB(170, 170, 170)

    .TwoColorGradient msoGradientHorizontal, 1

End With

This example adds a patterned line to myDocument.

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes.AddLine(10, 100, 250, 0).Line

    .Weight = 6

    .ForeColor.RGB = RGB(0, 0, 255)

    .BackColor.RGB = RGB(128, 0, 0)

    .Pattern = msoPatternDarkDownwardDiagonal

End With

See Also

Reference

ChartFillFormat Interface

ChartFillFormat Members

Microsoft.Office.Interop.PowerPoint Namespace