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

PictureFill.ScaleX Property

Gets or sets the horizontal scale factor for a picture used to tile the shape.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Package: DevExpress.RichEdit.Core

Declaration

float ScaleX { get; set; }

Property Value

Type Description
Single

A value between 0 and 1 that specifies the scale factor.

Remarks

The example below shows to use a picture as texture to fill a rectangle.

Rich_TextureFill

// 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_Leaf.png"));
// Access picture fill settings.
PictureFill pictureFill = rectangle.Fill.PictureFill;
// Tile the picture as texture.
pictureFill.Stretch = false;
// Scale the picture to 50% of its original size.
pictureFill.ScaleX = 0.5f;
pictureFill.ScaleY = 0.5f;
// Specify the first tile position.
pictureFill.TileAlign = TileAlignType.TopLeft;
// Specify the mirror type for tiles.
pictureFill.TileFlip = TileFlipType.Vertical;
See Also