Skip to main content

ImageBrick Class

A visual brick containing an image.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Printing.v24.1.Core.dll

NuGet Package: DevExpress.Printing.Core

#Declaration

[BrickExporter(typeof(ImageBrickExporter))]
public class ImageBrick :
    VisualBrick,
    IImageBrick,
    IVisualBrick,
    IBaseBrick,
    IBrick,
    IXtraSupportAfterDeserialize,
    IXtraPartlyDeserializable

The following members return ImageBrick objects:

#Remarks

ImageBrick is used to draw an image in a document and provides options that define the image settings.

ImageBrick

An image can be a bitmap, cursor or metafile and is assigned via the ImageBrick.ImageSource property.

#Example

This example demonstrates how to create an ImageBrick using the BrickGraphics.DrawImage method.

DrawImage

using DevExpress.XtraPrinting;
// ...

    VisualBrick visBrick;
    Image img = imageList1.Images[0];   
    BrickGraphics brickGraph = printingSystem1.Graph;

    // Start the report generation.
    printingSystem1.Begin();

    // Create a rectangle.
    RectangleF rect = new RectangleF(new PointF(0, 0), new SizeF(96, 96));

    // Specify a page area.
    brickGraph.Modifier = BrickModifier.Detail;

    // Add an image brick to the report.
    visBrick = brickGraph.DrawImage(img, rect, BorderSide.All, Color.White);

    // Finish the report generation.
    printingSystem1.End();

    // Preview the report.
    printingSystem1.PreviewFormEx.Show();

#Inheritance

Object
DevExpress.Printing.Utils.DocumentStoring.StorableObjectBase
See Also