Skip to main content

BrickGraphics.DrawCheckBox(RectangleF, Boolean) Method

Adds a specific CheckBoxBrick to a report.

Namespace: DevExpress.XtraPrinting

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

NuGet Packages: DevExpress.Printing.Core, DevExpress.Win.Dashboard.Design


public CheckBoxBrick DrawCheckBox(
    RectangleF rect,
    bool check


Name Type Description
rect RectangleF

The RectangleF structure that specifies the location and size of the current brick in measurement units, specified via the BrickGraphics.PageUnit property value.

check Boolean

true, if the checkbox is in a checked state, otherwise, false.


Type Description

The CheckBoxBrick added to a report.


This method adds a specific CheckBoxBrick to a report. CheckBoxBrick position and size are specified via the rect parameter. After creation, the checkbox appears in the center of the generated CheckBoxBrick. If this brick size is larger than the size of the checkbox, then the entire brick area, except the checkbox, will be populated with the color specified via the backColor parameter value. A user can create checkboxes in two states: checked Checked and unchecked Unchecked. The check parameter value defines the manner in which the checkbox is displayed. Graphical settings which are not defined via this method are obtained from the corresponding BrickGraphics properties.


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.

    // 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.

    // Preview the report
See Also