All docs
V21.1
21.2 (EAP/Beta)
21.1
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+

PictureFill.FillRect Property

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

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v21.1.Core.dll

Declaration

RectangleOffset FillRect { get; set; }

Property Value

Type Description
RectangleOffset

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

Remarks

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%.

Rich_PictureFill_FillRect

// 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.
rectangle.Fill.SetPictureFill(DocumentImageSource.FromFile("PictureFill_Dog.png"));
// Specify which part of the rectangle the picture should occupy.
rectangle.Fill.PictureFill.FillRect = new RectangleOffset(0f, 0.1f, 0f, 0.1f);

Note

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