PageHeaderFooter.Header Property

Provides access to the page header area.

Namespace: DevExpress.XtraPrinting

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


public PageArea Header { get; }

Property Value

Type Description

A PageArea object representing the page header.


Use the Header property to insert information (system information like page numbers or current date and user name, or any custom information) into the page header. For this, add three strings (left, center and right) to the collection, returned by the PageArea.Content property of the Header object.

Also, the PageArea.Font property specifies the font used to draw the page header’s text, and the PageArea.LineAlignment property specifies to which edge (top, center or bottom) of the page header its content should be aligned.


This example demonstrates how to use the link’s PageHeaderFooter to add extra information to the document’s page header.


A complete sample project is available in the DevExpress Code Examples database at

using System;
using System.Windows.Forms;
using DevExpress.XtraPrinting;
// ...

private void button1_Click(object sender, EventArgs e) {
    string leftColumn = "Pages: [Page # of Pages #]";
    string middleColumn = "User: [User Name]";
    string rightColumn = "Date: [Date Printed]";

    // Create a PageHeaderFooter object and initializing it with
    // the link's PageHeaderFooter.
    PageHeaderFooter phf = printableComponentLink1.PageHeaderFooter as PageHeaderFooter;

    // Clear the PageHeaderFooter's contents.

    // Add custom information to the link's header.
    phf.Header.Content.AddRange(new string[] { leftColumn, middleColumn, rightColumn });
    phf.Header.LineAlignment = BrickAlignment.Far;

    // Show the document's preview.
See Also