All docs
V20.2
21.1 (EAP/Beta)
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

ShapeFill.SetPatternFill(PatternFillType, Color, Color) Method

Applies a pattern fill to a shape.

Namespace: DevExpress.XtraRichEdit.API.Native

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

Declaration

void SetPatternFill(
    PatternFillType pattern,
    Color foregroundColor,
    Color backgroundColor
)

Parameters

Name Type Description
pattern PatternFillType

One of the preset patterns.

foregroundColor Color

A foreground color.

backgroundColor Color

A background color.

Remarks

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

Rich_ShapeFill_PatternFill

// Add a rectangle to a document.
Shape rectangle = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle, new RectangleF(300, 200, 500, 300));
// Apply a pattern to the rectangle.
rectangle.Fill.SetPatternFill(PatternFillType.SolidDiamond, Color.FromArgb(0x4D, 0x64, 0x8D), Color.FromArgb(0xFF, 0xEE, 0xAD));
See Also