corelibraries-devexpress-dot-xtraprinting-8cf3b355.md
A visual brick containing a check box.
Namespace : DevExpress.XtraPrinting
Assembly : DevExpress.Printing.v25.2.Core.dll
NuGet Package : DevExpress.Printing.Core
[BrickExporter(typeof(CheckBoxBrickExporter))]
public class CheckBoxBrick :
VisualBrick,
ICheckBoxBrick
<BrickExporter(GetType(CheckBoxBrickExporter))>
Public Class CheckBoxBrick
Inherits VisualBrick
Implements ICheckBoxBrick
The following members return CheckBoxBrick objects:
CheckBoxBrick is used to represent Boolean values as check boxes in a document and provides options that define the text color, alignment, font and format settings.
The check box state is defined via the CheckBoxBrick.Checked property. The checked state ( ) indicates true ( True in Visual Basic) and the unchecked state ( ) indicates false ( False in Visual Basic).
This example demonstrates how to create a CheckBoxBrick using the BrickGraphics.DrawCheckBox 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(60, 20));
// Specify a page area.
brickGraph.Modifier = BrickModifier.Detail;
// Add a checkbox brick to the report.
visBrick = brickGraph.DrawCheckBox(rect, BorderSide.All, SystemColors.ControlLight, true);
// Finish the report generation.
printingSystem1.End();
// Preview the report
printingSystem1.PreviewFormEx.Show();
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(60, 20))
' Specify a page area.
brickGraph.Modifier = BrickModifier.Detail
' Add a checkbox brick to the report.
visBrick = brickGraph.DrawCheckBox(rect, BorderSide.All, SystemColors.ControlLight, True)
' Finish the report generation.
printingSystem1.End()
' Preview the report.
printingSystem1.PreviewFormEx.Show()
IXtraSupportDeserializeCollectionItem
Object DevExpress.Printing.Utils.DocumentStoring.StorableObjectBase BrickBase Brick VisualBrick CheckBoxBrick
See Also