Skip to main content
.NET Framework 4.5.2+

Section.EndUpdateHeader(SubDocument) Method

Finalizes editing of the section’s header.

Namespace: DevExpress.XtraRichEdit.API.Native

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

Declaration

void EndUpdateHeader(
    SubDocument document
)

Parameters

Name Type Description
document SubDocument

A SubDocument instance, representing the header open for editing.

Remarks

Use the Section.BeginUpdateHeader - Section.EndUpdateHeader method pair to edit header content.

Example

Document document = server.Document;
document.AppendSection();
Section firstSection = document.Sections[0];
// Modify the header of the HeaderFooterType.First type.
SubDocument myHeader = firstSection.BeginUpdateHeader(HeaderFooterType.First);
DocumentRange range = myHeader.InsertText(myHeader.CreatePosition(0), " PAGE NUMBER ");
Field fld = myHeader.Fields.Create(range.End, "PAGE \\* ARABICDASH");
myHeader.Fields.Update();
firstSection.EndUpdateHeader(myHeader);
// Display the header of the HeaderFooterType.First type on the first page.
firstSection.DifferentFirstPage = true;

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

Note

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