Skip to main content

LinkBase.CreateDetailHeaderArea Event

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

Namespace: DevExpress.XtraPrinting

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

NuGet Package: DevExpress.Printing.Core

Declaration

public virtual event CreateAreaEventHandler CreateDetailHeaderArea

Event Data

The CreateDetailHeaderArea 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.

Remarks

Handle the CreateDetailHeaderArea event to customize the detail header 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.

Example

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

CreateAreas

void link1_CreateDetailHeaderArea(object sender, CreateAreaEventArgs e) {
    string s = "I am the Detail Header Area";
    e.Graph.StringFormat = new BrickStringFormat(StringAlignment.Center, StringAlignment.Center);
    e.Graph.Font = new DXFont("Comic Sans MS", 10); 
    e.Graph.BackColor = Color.LightGreen;
    e.Graph.ForeColor = Color.Green;
    SizeF sz = e.Graph.MeasureString(s);
    sz.Width += 2;
    RectangleF r = new RectangleF(new PointF(0,0),sz);
    e.Graph.DrawString(s, r);    
}
See Also