Skip to main content
.NET Framework 4.5.2+

PictureFill.FillRect Property

Specifies the portion of the shape to fill with a picture.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Package: DevExpress.RichEdit.Core


RectangleOffset FillRect { get; set; }

Property Value

Type Description

An object that specifies offsets from the shape’s edges. Valid values range from -1000 (-100 000%) to 1000 (100 000%).


Use the FillRect property to specify which part of the shape a picture should occupy. The picture is scaled to fit the specified area.

The example below shows how to fill the entire rectangle with a picture except for the top and bottom 10%.


// Create a rectangle.
Shape rectangle = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle, new RectangleF(300, 200, 480, 400));
// Use a picture to fill the rectangle.
// Specify which part of the rectangle the picture should occupy.
rectangle.Fill.PictureFill.FillRect = new RectangleOffset(0f, 0.1f, 0f, 0.1f);


The FillRect property has no effect on the shape visual appearance when a document is displayed in the WinForms or WPF Rich Text Editor. However, the FillRect settings are saved to a file, so you can use Microsoft® Word® to view and print the document.

See Also