LinkBase.CreateDetailArea Event

Occurs when a detail section of the document is being generated.

Namespace: DevExpress.XtraPrinting

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


public virtual event CreateAreaEventHandler CreateDetailArea

Event Data

The CreateDetailArea event's data class is CreateAreaEventArgs. The following properties provide information specific to this event:

Property Description
Graph Gets a BrickGraphics object used to draw in the current report.


Handle the CreateDetailArea event to customize the detail section of a document.

The document creation events occur in the following order:


This order may be different in descendants of the LinkBase class.

For more information on handling events, see Events and Delegates in MSDN.


The following example demonstrates how to write a LinkBase.CreateDetailArea event handler.

CreateDetailArea event

void link1_CreateDetailArea(object sender, CreateAreaEventArgs e) {
    e.Graph.StringFormat = e.Graph.StringFormat.ChangeAlignment(StringAlignment.Near);
    e.Graph.StringFormat = e.Graph.StringFormat.ChangeLineAlignment(StringAlignment.Center);
    e.Graph.Font = new Font("Tahoma", 16, FontStyle.Bold | FontStyle.Italic);
    e.Graph.BackColor = Color.DarkSeaGreen;
    e.Graph.BorderColor = Color.Black;
    Rectangle r;

    for (int i = 0; i < 2; i++) {
        r = new Rectangle(0, i * 50, 150, 50);
        e.Graph.DrawString("Hello World!", Color.Gold, r, BorderSide.All);
See Also