Skip to main content

BrickStringFormat.ChangeFormatFlags(StringFormatFlags) Method

Returns a BrickStringFormat object cloned from the current BrickStringFormat object.

Namespace: DevExpress.XtraPrinting

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

NuGet Package: DevExpress.Printing.Core


public BrickStringFormat ChangeFormatFlags(
    StringFormatFlags options


Name Type Description
options StringFormatFlags

A StringFormatFlags enumeration value containing formatting information.


Type Description

A cloned BrickStringFormat object.


This method clones the current BrickStringFormat object and replaces the current value of BrickStringFormat.FormatFlags with the value specified via the parameter.


This example illustrates use of the BrickStringFormat.ChangeFormatFlags method to change the text orientation within the brick. It creates and displays two bricks - the first brick has default settings, the second one has its text orientation modified.


using DevExpress.XtraPrinting;
// ...

VisualBrick visBrick;
BrickGraphics brickGraph = printingSystem1.Graph;
string s = "Developer Express Inc.";
BrickStringFormat brickSFormat = new BrickStringFormat();

// Start the report generation.

// Specify a page area.
brickGraph.Modifier = BrickModifier.Detail;

// Create a rectangle.
RectangleF rect = new RectangleF(new PointF(0, 0), new SizeF(180, 75));

// Add a brick to the report.
visBrick = brickGraph.DrawString(s, Color.MidnightBlue, rect, BorderSide.All);

// Change the text alignment within the brick.
brickSFormat = visBrick.Style.StringFormat.ChangeFormatFlags(StringFormatFlags.DirectionVertical
    | StringFormatFlags.DirectionRightToLeft);
brickGraph.StringFormat = brickSFormat;

// Create a second rectangle.
RectangleF rect1 = new RectangleF(new PointF(0, 75), new SizeF(180, 75));

// Add the next brick to the report.
visBrick = brickGraph.DrawString(s, Color.MidnightBlue, rect1, BorderSide.All);

// Finish the report generation.

// Preview the report.
See Also