Skip to main content
A newer version of this page is available. .

VisualBrick.Style Property

Gets or sets the BrickStyle instance used to render a brick in an appropriate format.

Namespace: DevExpress.XtraPrinting

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

Declaration

[XtraSerializableProperty(XtraSerializationVisibility.Content, true, false, false, 0, XtraSerializationFlags.Cached)]
public BrickStyle Style { get; set; }

Property Value

Type Description
BrickStyle

A BrickStyle instance to render a brick.

Remarks

The brick style allows a user to customize the appearance of a brick’s contents.

Example

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:

BrickStyle

Tip

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E938.

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 Font("Arial", 14, FontStyle.Bold | FontStyle.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();
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the Style property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also