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

PictureFill.Transparency Property

Gets or sets the picture’s transparency.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Package: DevExpress.RichEdit.Core

#Declaration

float Transparency { get; set; }

#Property Value

Type Description
Single

The transparency level from 0 (complete opacity) to 1 (complete transparency).

#Remarks

The example below shows how to fill a rectangle with a picture and set the transparency to 80%.

Rich_ShapeFill_PictureFill_Transparency

// 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_Dog.png"));
// Set the picture transparency.
rectangle.Fill.PictureFill.Transparency = 0.8f;
See Also