Back to Devexpress

ShapeFill.SetSolidFill(Color) Method

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-shapefill-dot-setsolidfill-x28-system-dot-drawing-dot-color-x29.md

latest2.0 KB
Original Source

ShapeFill.SetSolidFill(Color) Method

Applies a solid color to a shape.

Namespace : DevExpress.XtraRichEdit.API.Native

Assembly : DevExpress.RichEdit.v25.2.Core.dll

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
void SetSolidFill(
    Color color
)
vb
Sub SetSolidFill(
    color As Color
)

Parameters

NameTypeDescription
colorColor

A color to fill a shape.

|

Remarks

The example below shows how to fill a rectangle with a color.

csharp
// Add a rectangle to a document.
Shape rectangle = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle, new RectangleF(300, 200, 500, 300));
// Fill the rectangle with color.
rectangle.Fill.SetSolidFill(Color.FromArgb(0xFF, 0xEE, 0xAD));
vb
' Add a rectangle to a document.
Dim rectangle As Shape = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle, New RectangleF(300, 200, 500, 300))
' Fill the rectangle with color.
rectangle.Fill.SetSolidFill(Color.FromArgb(&HFF, &HEE, &HAD))

See Also

SolidFill

ShapeFill Interface

ShapeFill Members

DevExpress.XtraRichEdit.API.Native Namespace