.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Section.BeginUpdateFooter() Method

Starts editing the primary footer for the current section.

Namespace: DevExpress.XtraRichEdit.API.Native

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

Declaration

SubDocument BeginUpdateFooter()

Returns

Type Description
SubDocument

A SubDocument instance that is the footer being edited.

Remarks

Use the Section.BeginUpdateFooter - Section.EndUpdateFooter method pair to edit primary (the HeaderFooterType.Primary type) footer content. If the document has no footer as yet, this method creates a footer of the HeaderFooterType.Primary type and opens it for editing.

You can use the Section.HasFooter property to determine whether the document already has a footer which is the same for all pages (a footer of the HeaderFooterType.Primary type).

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();
        headerDocument.Paragraphs.Append();
        firstSection.EndUpdateHeader(headerDocument);
    }
}
See Also