Skip to main content

ImageBrick Class

A visual brick containing an image.

Namespace: DevExpress.XtraPrinting

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

Declaration

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

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();

The following code snippets (auto-collected from DevExpress Examples) contain references to the ImageBrick class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Inheritance

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