TextFootnote Class
Definition
A footnote at the text-model level: a nested Avalonia.Controls.Documents.TextModel.TextDocument holding the note's body, paired by Avalonia.Controls.Documents.TextModel.TextFootnote.NoteId with the Avalonia.Controls.Documents.RichFootnoteReference anchor that carries the number. The owning document keeps its notes in Avalonia.Controls.Documents.TextModel.TextDocument.Footnotes in anchor order, snapshots them with itself and restores them from a snapshot; the Avalonia.Controls.Documents.Footnote element is the optional facade over one of these, the way Avalonia.Controls.Documents.FlowDocument is over a text document. The rendered number is the note's position among the document's notes, never stored here.
public class TextFootnote
Constructors
| Name | Description |
|---|---|
| TextFootnote (2 overloads) | Initializes a note over a new empty note document, unpaired until an anchor claims it. |
TextFootnote overloads
TextFootnote Constructor
Initializes a note over a new empty note document, unpaired until an anchor claims it.
public TextFootnote()
TextFootnote Constructor
Initializes a note over document, a note-rooted document.
public TextFootnote(Avalonia.Controls.Documents.TextModel.TextDocument document, int noteId, string label)
Parameters
document Avalonia.Controls.Documents.TextModel.TextDocument
noteId int
label string
Properties
| Name | Description |
|---|---|
| Document | The note's body. |
| Label | The note's name in formats that address notes by name (markdown's [^label]); never displayed, null for a note created in the editor. |
| NoteId | The identity pairing this note with its anchor, document-unique and assigned by the pairing; 0 while unpaired. The displayed number is not the id: ordinals follow anchor order. |
| Owner | The document that owns the note, null while it is unowned. |
Document Property
The note's body.
public Avalonia.Controls.Documents.TextModel.TextDocument Document { get; set; }
Label Property
The note's name in formats that address notes by name (markdown's
[^label]); never displayed, null for a note created in the editor.
public string Label { get; set; }
NoteId Property
The identity pairing this note with its anchor, document-unique and assigned by the pairing; 0 while unpaired. The displayed number is not the id: ordinals follow anchor order.
public int NoteId { get; set; }
Owner Property
The document that owns the note, null while it is unowned.
public Avalonia.Controls.Documents.TextModel.TextDocument Owner { get; set; }
Events
| Name | Description |
|---|---|
| Changed | Raised when the id or label changes. |
Changed Event
Raised when the id or label changes.
public event EventHandler Changed