officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-section-dot-endupdatefooter-x28-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-subdocument-x29.md
Finalizes editing of the section’s footer.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
void EndUpdateFooter(
SubDocument document
)
Sub EndUpdateFooter(
document As SubDocument
)
| Name | Type | Description |
|---|---|---|
| document | SubDocument |
A SubDocument instance, representing the footer opened for editing.
|
Use the Section.BeginUpdateFooter - Section.EndUpdateFooter method pair to edit footer content.
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;
Dim document As Document = server.Document
document.AppendSection()
Dim firstSection As Section = document.Sections(0)
' Modify the header of the HeaderFooterType.First type.
Dim myHeader As SubDocument = firstSection.BeginUpdateHeader(HeaderFooterType.First)
Dim range As DocumentRange = myHeader.InsertText(myHeader.CreatePosition(0), " PAGE NUMBER ")
Dim fld As Field = 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 EndUpdateFooter(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.
winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/HeaderAndFooter.cs#L51
SubDocument newFooter = firstSection.BeginUpdateFooter();
firstSection.EndUpdateFooter(newFooter);
// Check whether the document already has a footer (the same footer for all pages).
word-processing-merge-documents-with-different-headers-and-footers/CS/Helpers/SectionsMerger.cs#L54
sourceSection.EndUpdateFooter(source);
targetSection.EndUpdateFooter(target);
winforms-richedit-iterate-through-all-sub-documents/CS/SubDocumentHelper.cs#L39
ProcessShapes(footer.Shapes, subDocumentProcessor);
section.EndUpdateFooter(footer);
}
office-file-api-ai-implementation/CS/BusinessObjects/RichEditExtension.cs#L25
UpdateSubDocument(footer, action);
section.EndUpdateFooter(footer);
}
word-document-api-iterate-through-all-sub-documents/CS/SubDocumentHelper.cs#L39
ProcessShapes(footer.Shapes, subDocumentProcessor);
section.EndUpdateFooter(footer);
}
winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/HeaderAndFooter.vb#L46
Dim newFooter As DevExpress.XtraRichEdit.API.Native.SubDocument = firstSection.BeginUpdateFooter()
firstSection.EndUpdateFooter(newFooter)
' Check whether the document already has a footer (the same footer for all pages).
word-processing-merge-documents-with-different-headers-and-footers/VB/Helpers/SectionsMerger.vb#L48
target.Delete(emptyParagraph)
sourceSection.EndUpdateFooter(source)
targetSection.EndUpdateFooter(target)
word-document-api-insert-inline-pictures/VB/InlinePictures/Program.vb#L46
docFooter.Images.Append(barCode.BarCodeImage)
doc.Sections(0).EndUpdateFooter(docFooter)
'#End Region ' #inlinepictures
winforms-richedit-iterate-through-all-sub-documents/VB/SubDocumentHelper.vb#L34
ProcessShapes(footer.Shapes, subDocumentProcessor)
section.EndUpdateFooter(footer)
End If
word-document-api-iterate-through-all-sub-documents/VB/SubDocumentHelper.vb#L34
ProcessShapes(footer.Shapes, subDocumentProcessor)
section.EndUpdateFooter(footer)
End If
See Also