PictureFill.TileAlign Property
Specifies the first tile position for a texture fill (the Stretch property is false).
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly:
DevExpress.RichEdit.v22.1.Core.dll
Declaration
TileAlignType TileAlign { get; set; }
Property TileAlign As TileAlignType
Property Value
Type |
Description |
TileAlignType |
An enumeration value that specifies the first tile alignment relative to the shape.
|
Available values:
Name |
Description |
TopLeft
|
The first tile is aligned to the top left of the shape.
|
Top
|
The first tile is aligned to the top edge of the shape and centered.
|
TopRight
|
The first tile is aligned to the top right of the shape.
|
Left
|
The first tile is aligned to the left edge of the shape and centered.
|
Center
|
The first tile is aligned to the center of the shape.
|
Right
|
The first tile is aligned to the right edge of the shape and centered.
|
BottomLeft
|
The first tile is aligned to the bottom left of the shape.
|
Bottom
|
The first tile is aligned to the bottom edge of the shape and centered.
|
BottomRight
|
The first tile is aligned to the bottom right of the shape.
|
The example below shows to use a picture as texture to fill a rectangle.
// 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;
' Create a rectangle.
Dim rectangle As Shape = 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.
Dim pictureFill As 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