All docs
V20.1
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Note Interface

Represents a document note (footnote or endnote).

Namespace: DevExpress.XtraRichEdit.API.Native

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

Declaration

public interface Note
Public Interface Note

Remarks

The NoteCollection contains Note objects. Use the Document.Footnotes property to access the collection of footnotes, and the Document.Endnotes property to access the endnotes collection.

Call the NoteCollection.Insert method to insert a new note into the specific document position. Pass the symbol used to mark the reference to the Insert method to insert a note with a custom mark. The Note.IsCustom property indicates whether the note has a custom reference mark. The Note.Range property provides access to the range occupied by the reference mark.

Use the Note.BeginUpdate() - Note.EndUpdate() methods to access or update the note's content.

The code sample below shows how to change the endnote's character properties:

static void EditEndnote(RichEditDocumentServer wordProcessor)
{
  wordProcessor.LoadDocument("Documents//Grimm.docx");
  Document document = wordProcessor.Document;

  //Access the endnote content:
  SubDocument endnote = document.Endnotes[0].BeginUpdate();

  //Exclude the reference mark and the space after from the range to be edited:
  DocumentRange noteTextRange = endnote.CreateRange(endnote.Range.Start.ToInt() + 2, endnote.Range.Length
      - 2);

  //Access the range's character options:
  CharacterProperties characterProperties = endnote.BeginUpdateCharacters(noteTextRange);

  //Change the note's color and make it italic:
  characterProperties.ForeColor = System.Drawing.Color.Red;
  characterProperties.Italic = true;

  //Finalize the character formatting update:
  endnote.EndUpdateCharacters(characterProperties);

  //Finalize the endnote update:
  document.Endnotes[0].EndUpdate(endnote);
}
See Also