Skip to main content
All docs
V21.2

BrickSelector Class

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

Namespace: DevExpress.XtraPrinting

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

Declaration

public static class BrickSelector

Remarks

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

Example

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();
report.Bands.Add(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);

Inheritance

Object
BrickSelector
See Also