Skip to main content
.NET Framework 4.5.2+

Section.BeginUpdateHeader(HeaderFooterType) Method

Starts editing the document’s header of the specified type.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v22.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core


SubDocument BeginUpdateHeader(
    HeaderFooterType type


Name Type Description
type HeaderFooterType

A HeaderFooterType enumeration value, representing the type of the header open for editing.


Type Description

A SubDocument instance representing the header being edited.


Use the Section.BeginUpdateHeader - Section.EndUpdateHeader method pair to edit header content. If the document has no header as yet, this method creates a header of the specified type and opens it for editing.

You can use the Section.HasHeader method to determine whether the document already has a header.


View Example

using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
Document document = wordProcessor.Document;
    Section firstSection = document.Sections[0];

    // Check whether the document already has a header (the same header for all pages).
    if (!firstSection.HasHeader(HeaderFooterType.Primary))
        //If not, create an empty header.
        SubDocument headerDocument = firstSection.BeginUpdateHeader();

The following code snippets (auto-collected from DevExpress Examples) contain references to the BeginUpdateHeader(HeaderFooterType) method.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also