Skip to main content

CheckBoxBrick Class

A visual brick containing a check box.

Namespace: DevExpress.XtraPrinting

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

NuGet Package: DevExpress.Printing.Core

Declaration

[BrickExporter(typeof(CheckBoxBrickExporter))]
public class CheckBoxBrick :
    VisualBrick,
    ICheckBoxBrick

Remarks

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 (Checked) indicates true (True in Visual Basic) and the unchecked state (Unchecked) indicates false (False in Visual Basic).

CheckBoxBrick

Example

This example demonstrates how to create a CheckBoxBrick using the BrickGraphics.DrawCheckBox method.

DrawCheckBox

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();

Inheritance

Object
DevExpress.Printing.Utils.DocumentStoring.StorableObjectBase
See Also