corelibraries-devexpress-dot-xtraprinting-2aaf57a6.md
Specifies the report section’s modifiers.
Namespace : DevExpress.XtraPrinting
Assembly : DevExpress.Printing.v25.2.Core.dll
NuGet Package : DevExpress.Printing.Core
[Flags]
public enum BrickModifier : short
<Flags>
Public Enum BrickModifier As Short
| Name | Description |
|---|---|
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.
|
The following properties accept/return BrickModifier values:
A report contains several sections that are listed in the BrickModifier enumerator. The following image shows the report page structure.
Bricks can be inserted into any report section. However, in order to be displayed in a preview, a report must contain at least one brick in its detail section. To customize a report section, set the BrickGraphics.Modifier property to one of the BrickModifier members. A Modifier is a trigger that tells the PrintingSystem which report section to customize.
Note
To create a brick, you must begin with zero vertical coordinates, within any report section.
The following example demonstrates how to draw a line in a Printing System document. The first way to do this is to use the BrickGraphics.DrawLine method, that is specially designed to draw lines easily. In addition, you can use the more common approach, by drawing a LineBrick via the BrickGraphics.DrawBrick method.
The code below illustrates how this can be done.
using System;
using System.Drawing;
using System.Windows.Forms;
using DevExpress.XtraPrinting;
// ...
namespace LineBrickAndDrawLine {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e) {
printControl1.PrintingSystem = ps;
}
private void btnDrawLine_Click(object sender, EventArgs e) {
// Prepare for creating a document.
ps.Begin();
BrickGraphics gr = ps.Graph;
gr.Modifier = BrickModifier.Detail;
// Draw a line with the specified coordinates, foreground color and thickness.
LineBrick brick = gr.DrawLine(new PointF(0, 0), new PointF(200, 200), Color.Red, 5);
// Change the line style to dash-dot-dot.
brick.LineStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot;
// Hide brick borders.
brick.BorderWidth = 0;
// Finish creating the document.
ps.End();
}
private void btnDrawBrick_Click(object sender, EventArgs e) {
// Prepare for creating a document.
ps.Begin();
BrickGraphics gr = ps.Graph;
gr.Modifier = BrickModifier.Detail;
// Create a new line brick.
LineBrick brick = new LineBrick();
// Specify its properties.
brick.Rect = new RectangleF(0, 0, 200, 200);
brick.LineDirection = DevExpress.XtraReports.UI.LineDirection.BackSlant;
brick.ForeColor = Color.Red;
brick.LineWidth = 5;
brick.LineStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot;
brick.BorderWidth = 0;
// Draw this brick.
gr.DrawBrick(brick);
// Finish creating the document.
ps.End();
}
}
}
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Imports DevExpress.XtraPrinting
' ...
Namespace LineBrickAndDrawLine
Partial Public Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
End Sub
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) _
Handles MyBase.Load
printControl1.PrintingSystem = ps
End Sub
Private Sub btnDrawLine_Click(ByVal sender As Object, ByVal e As EventArgs) _
Handles btnDrawLine.Click
' Prepare for creating a document.
ps.Begin()
Dim gr As BrickGraphics = ps.Graph
gr.Modifier = BrickModifier.Detail
' Draw a line with the specified coordinates, foreground color and thickness.
Dim brick As LineBrick = gr.DrawLine(New PointF(0, 0), New PointF(200, 200), _
Color.Red, 5)
' Change the line style to dash-dot-dot.
brick.LineStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot
' Hide brick borders.
brick.BorderWidth = 0
' Finish creating the document.
ps.End()
End Sub
Private Sub btnDrawBrick_Click(ByVal sender As Object, ByVal e As EventArgs) _
Handles btnDrawBrick.Click
' Prepare for creating a document.
ps.Begin()
Dim gr As BrickGraphics = ps.Graph
gr.Modifier = BrickModifier.Detail
' Create a new line brick.
Dim brick As New LineBrick()
' Specify its properties.
brick.Rect = New RectangleF(0, 0, 200, 200)
brick.LineDirection = DevExpress.XtraReports.UI.LineDirection.BackSlant
brick.ForeColor = Color.Red
brick.LineWidth = 5
brick.LineStyle = System.Drawing.Drawing2D.DashStyle.DashDotDot
brick.BorderWidth = 0
' Draw this brick.
gr.DrawBrick(brick)
' Finish creating the document.
ps.End()
End Sub
End Class
End Namespace
See Also