Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GradientFill.TileRect Property

Specifies the rectangular region to which a gradient is applied. This region is tiled to fill the shape.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Package: DevExpress.RichEdit.Core

#Declaration

RectangleOffset TileRect { get; set; }

#Property Value

Type Description
RectangleOffset

An object that specifies offsets (in percentage) from the edges of a shape’s bounding box to the tile rectangle. A positive percentage specifies an inset, and a negative percentage defines an outset.

#Remarks

The example below shows how to tile a linear gradient fill. The rightmost 25% of the shape contains the tile rectangle to which a gradient is applied. The gradient is tiled three times to cover the leftmost 75% of the shape. The tile rectangle is flipped horizontally to fill the shape.

Rich_GradientFill_TileRect_Example

// Add a rectangle to the document.
Shape rectangle = document.Shapes.InsertShape(document.Range.Start, ShapeGeometryPreset.Rectangle, new RectangleF(300, 200, 500, 300));
// Fill the rectangle with a gradient.
rectangle.Fill.SetGradientFill(GradientType.Linear, Color.FromArgb(0xF6, 0xCD, 0x61), Color.FromArgb(0xEE, 0x40, 0x35));
// Tile the gradient.
rectangle.Fill.GradientFill.TileRect = new RectangleOffset(0.75f, 0.0f, 0.0f, 0.0f);
See Also