corelibraries-devexpress-dot-xtraprinting-4a5b5d32.md
Represents a report drawing style.
Namespace : DevExpress.XtraPrinting
Assembly : DevExpress.Printing.v25.2.Core.dll
NuGet Package : DevExpress.Printing.Core
public class BrickStyle :
ICloneable,
IDisposable
Public Class BrickStyle
Implements ICloneable,
IDisposable
The following members return BrickStyle objects:
Show 11 links
The BrickStyle class encapsulates properties that control the appearance of report bricks. These properties specify: foreground, background and border colors for bricks, the font for text drawing, border side settings and text formatting information. The BrickGraphics.DefaultBrickStyle property accepts a BrickStyle instance as the default style for all bricks drawn via a specific BrickGraphics instance. Each setting defined via the BrickGraphics.DefaultBrickStyle property value can be overriden by the corresponding property of the drawn bricks. A style for a specific brick also can be assigned via the VisualBrick.Style property.
This example illustrates use of the BrickStyle class. The result of applying the style defined via the BrickStyle class instance is shown in the following picture:
using System;
using System.Drawing;
using System.Windows.Forms;
using DevExpress.XtraPrinting;
// ...
private void Form1_Load(object sender, EventArgs e) {
string s = "XtraPrinting Library";
BrickGraphics brickGraph = printingSystem1.Graph;
VisualBrick visBrick = new VisualBrick();
// Specify the style
BrickStyle bStyle = new BrickStyle(BorderSide.Bottom, 2, Color.Gold, Color.Navy,
Color.DodgerBlue, new DXFont("Arial", 14, DXFontStyle.Bold | DXFontStyle.Italic),
new BrickStringFormat(StringAlignment.Far, StringAlignment.Near));
// Start the report generation.
printingSystem1.Begin();
// Create bricks.
brickGraph.Modifier = BrickModifier.Detail;
visBrick = brickGraph.DrawString(s, new RectangleF(0, 0, 250, 40));
visBrick = brickGraph.DrawString(s, new RectangleF(0, 40, 250, 40));
// Apply the style to the current brick.
visBrick.Style = bStyle;
// Finish the report generation.
printingSystem1.End();
}
Imports System
Imports System.Drawing
Imports System.Windows.Forms
Imports DevExpress.XtraPrinting
' ...
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) _
Handles MyBase.Load
Dim s As String = "XtraPrinting Library"
Dim brickGraph As BrickGraphics = printingSystem1.Graph
Dim visBrick As New VisualBrick()
' Specify the style.
Dim bStyle As New BrickStyle(BorderSide.Bottom, 2, Color.Gold, Color.Navy, _
Color.DodgerBlue, New ("Arial", 14, DXFontStyle.Bold Or DXFontStyle.Italic), _
New BrickStringFormat(StringAlignment.Far, StringAlignment.Near))
' Start the report generation.
printingSystem1.Begin()
' Create bricks.
brickGraph.Modifier = BrickModifier.Detail
visBrick = brickGraph.DrawString(s, New RectangleF(0, 0, 250, 40))
visBrick = brickGraph.DrawString(s, New RectangleF(0, 40, 250, 40))
' Apply the style to the current brick.
visBrick.Style = bStyle
' Finish the report generation.
printingSystem1.End()
End Sub
Object BrickStyle XRControlStyle
See Also