Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

Section.BeginUpdateFooter(HeaderFooterType) Method

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

Namespace: DevExpress.XtraRichEdit.API.Native

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

Declaration

SubDocument BeginUpdateFooter(
    HeaderFooterType type
)

Parameters

Name Type Description
type HeaderFooterType

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

Returns

Type Description
SubDocument

A SubDocument instance representing the footer being edited.

Remarks

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

You can use the Section.HasFooter property to determine whether the document already has a footer.

Example

The following code snippet opens the footer of the first section of the document for editing. The footer is of the HeaderFooterType.First type, so it is displayed for the first page only if the corresponding mode is switched on (use the Section.DifferentFirstPage property). Then, the string of text and a PAGE field are inserted into the document and the Section.EndUpdateFooter method is called to finalize the modification.

document.AppendSection()
Dim firstSection As Section = document.Sections(0)
' Modify the footer of the HeaderFooterType.First type.
Dim myFooter As SubDocument = firstSection.BeginUpdateFooter(HeaderFooterType.First)
Dim range As DocumentRange = myFooter.InsertText(myFooter.CreatePosition(0), " PAGE NUMBER ")
Dim fld As Field = myFooter.Fields.Create(range.End, "PAGE \* ARABICDASH")
myFooter.Fields.Update()
firstSection.EndUpdateHeader(myFooter)
' Display the footer 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 BeginUpdateFooter(HeaderFooterType) 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