Skip to main content
.NET Framework 4.5.2+

NoteCollection.Insert(DocumentPosition, String) Method

Inserts a new note into the specific document position with a custom mark.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Package: DevExpress.RichEdit.Core


Note Insert(
    DocumentPosition position,
    string customMark


Name Type Description
position DocumentPosition

A document position to insert a reference into.

customMark String

A format string for the symbol used to mark the reference.


Type Description

A note (footnote or endnote).


A custom reference mark representation depends on the font applied to the reference range.

The code sample below shows how to insert a footnote and an endnote with a custom mark:

RichEditDocumentServer wordProcessor = new RichEditDocumentServer();
Document document = wordProcessor.Document;

//Insert a footnote with a ` custom mark:
DocumentPosition footnoteWithCustomMarkPosition = document.CreatePosition(document.Paragraphs[7].Range.End.ToInt() - 1);
document.Footnotes.Insert(footnoteWithCustomMarkPosition, "\u00BA");

//Insert an endnote with a º custom mark:
DocumentPosition endnoteWithCustomMarkPosition = document.CreatePosition(document.Paragraphs[document.Paragraphs.Count - 2].Range.End.ToInt() - 1);
document.Endnotes.Insert(endnoteWithCustomMarkPosition, "\u0060");

The following code snippets (auto-collected from DevExpress Examples) contain references to the Insert(DocumentPosition, String) 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