LinkBase.CreateDetailArea Event

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

Namespace: DevExpress.XtraPrinting

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

Declaration

public virtual event CreateAreaEventHandler CreateDetailArea
Public Overridable Event CreateDetailArea As CreateAreaEventHandler

Event Data

The CreateDetailArea event handler receives an argument of the CreateAreaEventArgs type. The following properties provide information specific to this event.

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

Remarks

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

The document creation events occur in the following order:

NOTE

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

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

Examples

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