Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

ShapeFill.SetPictureFill(DocumentImageSource) Method

Applies a picture fill to a shape.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Package: DevExpress.RichEdit.Core

Declaration

void SetPictureFill(
    DocumentImageSource imageSource
)

Parameters

Name Type Description
imageSource DocumentImageSource

An object that provides the image for the shape.

Remarks

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

Rich_ShapeFill_PictureFill

// Create a rectangle.
Shape rectangle = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle, new RectangleF(300, 200, 500, 350));
// Use a picture to fill the rectangle.
rectangle.Fill.SetPictureFill(DocumentImageSource.FromFile("PictureFill_Dog.png"));

Use the ShapeFill.PictureFill property to specify picture fill settings.

See Also