Skip to main content
A newer version of this page is available. .

VisualBrick Class

A visual brick that is rendered on a page as a simple rectangle and the base for all other visual bricks.

Namespace: DevExpress.XtraPrinting

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

Declaration

[BrickExporter(typeof(VisualBrickExporter))]
public class VisualBrick :
    Brick,
    IVisualBrick,
    IBaseBrick,
    IBrick,
    IXtraPartlyDeserializable

The following members return VisualBrick objects:

Library Related API Members
Cross-Platform Class Library BookmarkInfo.ParentBrick
BrickGraphics.DrawRect(RectangleF, BorderSide, Color, Color)
EditingField.Brick
Reporting DrawEventArgs.Brick
HtmlEventArgs.Brick
PreviewMouseEventArgs.Brick

Remarks

VisualBrick exposes the properties that define the basic behavior of a visual brick.

Example

The following code demonstrates how to create a VisualBrick and specify its dimensions and border settings, using the BrickGraphics.DrawRect method:

using DevExpress.XtraPrinting;
// ...

    VisualBrick visBrick;
    BrickGraphics brickGraph = printingSystem1.Graph;

    // Start the report generation.
    printingSystem1.Begin();

    // Create a rectangle.
    RectangleF rect = new RectangleF(new PointF(0, 0), new SizeF(150, 50));

    // Specify a page area.
    brickGraph.Modifier = BrickModifier.Detail;

    // Add a brick to the report.
    visBrick = brickGraph.DrawRect(rect, BorderSide.All, Color.Yellow, Color.Blue);

    // Finish the report generation.
    printingSystem1.End();

    // Preview the report.
    printingSystem1.PreviewFormEx.Show();

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the VisualBrick class.

Note

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.

Implements

See Also