Back to Devexpress

BrickGraphics.Modifier Property

corelibraries-devexpress-dot-xtraprinting-dot-brickgraphics-fe9bcc47.md

latest6.8 KB
Original Source

BrickGraphics.Modifier Property

Specifies the page area for displaying a specific brick.

Namespace : DevExpress.XtraPrinting

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

NuGet Package : DevExpress.Printing.Core

Declaration

csharp
public BrickModifier Modifier { get; set; }
vb
Public Property Modifier As BrickModifier

Property Value

TypeDescription
BrickModifier

A BrickModifier enumerator value that defines the page area for displaying a specific brick.

|

Available values:

NameDescription
None

This value doesn’t represent any section of the document. It is used when specifying the LinkBase.SkipArea property, to specify that no section should be skipped when creating a document. Note that you can’t create a document using this brick modifier value.

| | Detail |

Represents the detail section of the document.

| | DetailHeader |

Represents the detail header section of the document.

| | DetailFooter |

Represents the detail footer section of the document.

| | ReportHeader |

Represents the report header section of the document.

| | ReportFooter |

Represents the report footer section of the document.

| | MarginalHeader |

Represents the marginal page header section of the document.

| | MarginalFooter |

Represents the marginal page footer section of the document.

| | InnerPageHeader |

Represents the inner page header section of the document.

| | InnerPageFooter |

Represents the inner page footer section of the document.

|

Remarks

A report contains several sections. These sections are listed in the BrickModifier enumerator. The following image describes a report’s structure:

In order to be displayed in the preview window, a report must contain at least one brick in the detail section. However, bricks can be inserted into any report section. To customize a report section, you should set the BrickGraphics.Modifier property to one of the BrickModifier members. Modifier is a trigger that tells the PrintingSystem which report section to customize.

Example

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

csharp
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();
vb
Imports DevExpress.XtraPrinting
' ...

    Dim visBrick As VisualBrick
    Dim brickGraph As BrickGraphics = printingSystem1.Graph

    ' Start the report generation.
    printingSystem1.Begin()

    ' Create a rectangle.
    Dim rect As RectangleF = 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 snippets (auto-collected from DevExpress Examples) contain references to the Modifier property.

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.

reporting-winforms-merge-reports-runtime/CS/reportMerging/Form1.cs#L86

csharp
}
e.Graph.Modifier = BrickModifier.None;
e.Graph.Modifier = BrickModifier.Detail;

reporting-winforms-custom-brick/CS/Form1.cs#L22

csharp
// Specify the page area to draw a brick.
printingSystem1.Graph.Modifier = BrickModifier.Detail;
// Add the brick with specified dimensions to the document.

reporting-winforms-merge-reports-runtime/VB/reportMerging/Form1.vb#L83

vb
e.Graph.Modifier = DevExpress.XtraPrinting.BrickModifier.None
e.Graph.Modifier = DevExpress.XtraPrinting.BrickModifier.Detail

reporting-winforms-custom-brick/VB/Form1.vb#L23

vb
' Specify the page area to draw a brick.
printingSystem1.Graph.Modifier = BrickModifier.Detail
' Add the brick with specified dimensions to the document.

See Also

BrickModifier

Document Sections

BrickGraphics Class

BrickGraphics Members

DevExpress.XtraPrinting Namespace