Page.AddBrick(VisualBrick) Method
Adds the specified brick to the page.
Namespace: DevExpress.XtraPrinting
Assembly: DevExpress.Printing.v20.1.Core.dll
NuGet Packages: DevExpress.Printing.Core, DevExpress.WindowsDesktop.Printing.Core
Declaration
Parameters
Name | Type | Description |
---|---|---|
brick | VisualBrick | The brick to be added to the page. |
Remarks
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);
page.AddBrick(labelBrick);
}
}
The brick is printed over other bricks if they occupy its position.
Note
This method does not work if you use the CachedReportSource/CachedReportSourceWeb component to create report documents.
See Also