Skip to main content

ShapeFill.SetPictureFill(Image) Method

Applies a picture fill to a shape.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

[Browsable(false)]
void SetPictureFill(
    Image image
)

Parameters

Name Type Description
image Image

An image to fill a 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(System.Drawing.Image.FromFile("PictureFill_Dog.png"));

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

See Also