Page.AddBrick(VisualBrick) Method

Adds the specified brick to the page.

Namespace: DevExpress.XtraPrinting

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


public abstract void AddBrick(
    VisualBrick brick
Public MustOverride Sub AddBrick(
    brick As VisualBrick


Name Type Description
brick VisualBrick

The brick to be added to the page.


Use this method to add a brick to a document's page(s). The following code demonstrates how to use this method to add a label brick to all pages of a document:

private void XtraReport1_AfterPrint(object sender, EventArgs e) {
    string text = "Developer Express Inc.";
    Font font = new Font("Arial", 20f, FontStyle.Bold);
    SizeF size = this.PrintingSystem.Graph.MeasureString(text, font);
    foreach (Page page in this.Pages) {
        LabelBrick labelBrick = CreateLabel(page, font, size, text);

The brick is printed over other bricks if they occupy its position.


This method does not work if you use the CachedReportSource/CachedReportSourceWeb component to create report documents.

See Also