Skip to main content

CharacterCombBrick Class

A visual brick containing text whose characters are displayed in individual cells.

Namespace: DevExpress.XtraPrinting

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

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


public class CharacterCombBrick :


The CharacterCombBrick class allows you to display characters in separate cells in a document.


Use the CharacterCombBrick.CellVerticalSpacing and CharacterCombBrick.CellHorizontalSpacing properties to specify the spacing between adjacent cells.

The CharacterCombBrick.CellSizeMode property defines how and whether the cell size should depend on the current font size.

SizeMode Description
AutoSize The cell size depends on the current font size .
AutoWidth Only the cell width depends on the current font size (the CharacterCombBrick.CellWidth property is ignored), and the CharacterCombBrick.CellHeight value is specified manually.
AutoHeight Only the cell height depends on the current font size (the CharacterCombBrick.CellHeight property is ignored), and the CharacterCombBrick.CellWidth value is specified manually.
Custom The cell size is determined by the CharacterCombBrick.CellHeight and CharacterCombBrick.CellWidth property values and does not depend on the assigned font size.

The following example demonstrates how to draw the CharacterCombBrick in the document.

using System;
using System.Drawing;
using System.Windows.Forms;
using DevExpress.XtraPrinting;

public partial class Form1 : Form {
    PrintingSystem printingSystem = new PrintingSystem();

    public Form1() {

    private void Form1_Load(object sender, EventArgs e) {
        documentViewer1.PrintingSystem = printingSystem;

    private void btnDrawCharacterComb_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) {
        // Prepare for creating a document.
        BrickGraphics gr = printingSystem.Graph;
        gr.Modifier = BrickModifier.Detail;

        // Create a new brick instance.
        CharacterCombBrick brick = new CharacterCombBrick();

        // Set the brick's static text and specify its size. 
        brick.Text = "First Name";
        brick.Rect = new RectangleF(0, 0, 200, 150);

        // Specify the cell width and height.
        brick.CellSizeMode = SizeMode.Custom;
        brick.CellWidth = 100;
        brick.CellHeight = 100;

        // Specify the spacing between cells.        
        brick.CellHorizontalSpacing = 10;
        brick.CellVerticalSpacing = 10;

        // Draw this brick.

        // Finish creating the document.


See Also