[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Product Class Structure
    Supported Formats
   [Expand]Getting Started
   [Expand]RichEditControl Document
   [Expand]Fields
    Text Formatting
    Import and Export
   [Expand]Page Layout
    Printing
    AutoCorrect
    Mail Merge
    Restrictions and Protection
    Syntax Highlighting
    Traversing the Document
   [Expand]Visual Elements
    Services
    Events
    Commands
    HTML Tag Support
   [Collapse]Examples
    [Expand]UI Customization
    [Expand]Files
    [Expand]Text
    [Expand]Formatting
    [Expand]Styles
    [Expand]Lists
    [Expand]Pictures
    [Expand]Text Boxes
    [Expand]Tables
    [Collapse]Document Elements
      How to: Insert Bookmark or Hyperlink
      How to: Create, Edit and Delete Comments
      How to: Specify Document Properties
      How to: Create and Modify Header
      How to: Create a Checkbox
    [Expand]Layout
    [Expand]Automation
    [Expand]Mail Merge
     Spell Check
    [Expand]Export
    [Expand]Printing
    [Expand]Protection
    [Expand]Commands
    [Expand]Miscellaneous
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Create and Modify Header

The following article explains how to create and modify a document header.

Expanded Create a Header

To create a document header, select the section where it is going to be located. To check whether this section already has a header, use the Section.HasHeader property.

The Section.BeginUpdateHeader method is used to start the process. It also creates a new header of the specified HeaderFooterType type. If the type is not specified, the HeaderFooterType.Primary header will be created.

To work with the document header, use the Document.ChangeActiveDocument method. Note that if this method is not used, the wrong header can be selected and the follow-up actions may fail.

Use the Section.EndUpdateHeader to finish working with the header.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T213968.

Expanded Modify Header

To modify the header, specify the section to which the header belongs and use the Section.BeginUpdateHeader method to open it for modifying. To insert additional content to the header, use the SubDocument.InsertText or ShapeCollection.InsertPicture method. Use the Section.EndUpdateHeader to complete the modification.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=T213968.

Is this topic helpful?​​​​​​​