Skip to main content
All docs

BrickSelector Class

Selects bricks from a document or document page(s).

Namespace: DevExpress.XtraPrinting

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

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


public static class BrickSelector


Use the static methods stored in this class to select bricks from a document or its page(s).

Operation Methods
Select all bricks The GetBricks overloaded methods
Select bricks that contain a specific tag The GetBricksByTag overloaded methods
Select bricks that contain specific text The GetBricksByText overloaded methods
Select bricks that were created by a specific control The GetBricksByXRControl overloaded methods


The following code selects bricks in a report document:

using DevExpress.XtraReports.UI;
using DevExpress.XtraPrinting;
// ...
// Create a simple report.
XtraReport report = new XtraReport();
DetailBand detailBand = new DetailBand();
// Add two label controls and a character comb control to the report.
XRLabel label1 = new XRLabel() { Text = "First Label", Tag = "select"};
XRLabel label2 = new XRLabel() { Text = "Second Label"};
XRCharacterComb characterComb = new XRCharacterComb() { Text = "Character Comb", Tag = "select" };
detailBand.Controls.AddRange(new XRControl[] { label1, label2, characterComb });
// Get all bricks in a document.
var bricks = BrickSelector.GetBricks(report.PrintingSystem.Document); 
// Get bricks with the "select" tag from the document's first page.
var bricks = BrickSelector.GetBricksByTag(report.PrintingSystem.Document.Pages[0], "select"); 
// Get brick(s) created by a specific control.
var bricks = BrickSelector.GetBricksByXRControl(report.PrintingSystem.Document, label1);


See Also