Skip to main content

BrickGraphics.DrawBrick(Brick) Method

Adds a brick to a report.

Namespace: DevExpress.XtraPrinting

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

NuGet Packages: DevExpress.Printing.Core, DevExpress.Win.Dashboard.Design


public Brick DrawBrick(
    Brick brick


Name Type Description
brick Brick

The brick to be added to a report.


Type Description

The brick added to a report.


This method can be used to add any brick type to a report.


Enclose the document creation statements into the PrintingSystemBase.Begin and PrintingSystemBase.End call pair.


The following code demonstrates how to use the BrickGraphics.DrawBrick method to draw a predefined brick in a report. Note that prior to executing this code, it’s required to add the PrintingSystem component (called printingSystem1) to your application.


A complete sample project is available in the DevExpress Code Examples database at

using System.Drawing;
using DevExpress.XtraPrinting;
// ...

private void button1_Click(object sender, EventArgs e) {
    // Obtain the PrintingSystem's graphics.
    BrickGraphics gr = printingSystem1.Graph;

    // Load an image from a file.
    Image img = Image.FromFile(@"..\..\Data\Fish.png");

    // Create an ImageBrick and specify its properties.
    ImageBrick ibrk = new ImageBrick();
    ibrk.Image = img;
    ibrk.Sides = BorderSide.All;
    ibrk.BorderColor = Color.Blue;
    ibrk.BorderWidth = 10;

    // Start report generation.

    // Add the ImageBrick to the Detail section of the report.
    RectangleF r = new RectangleF(new PointF(0, 0), new SizeF(256, 160));
    gr.Modifier = BrickModifier.Detail;
    gr.DrawBrick(ibrk, r);

    // Finish report generation.

    // Display the Print Preview form.

The following code snippets (auto-collected from DevExpress Examples) contain references to the DrawBrick(Brick) method.


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.

See Also