CustomInlineDraft Class
Definition
Inline draft for custom (non-built-in) node kinds. Accepts an arbitrary Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind registered via Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind.Register(string,Avalonia.Controls.Documents.TextModel.NodeKindFlags).
public class CustomInlineDraft
Constructors
| Name | Description |
|---|---|
| CustomInlineDraft | Initializes a new instance of Avalonia.Controls.Documents.Serialization.Authoring.CustomInlineDraft for the given node kind. |
CustomInlineDraft Constructor
Initializes a new instance of Avalonia.Controls.Documents.Serialization.Authoring.CustomInlineDraft for the given node kind.
public CustomInlineDraft(Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind kind, Avalonia.Controls.Documents.TextModel.Formatting.InlineFormatting formatting, Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting elementFormatting)
Parameters
kind Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind
formatting Avalonia.Controls.Documents.TextModel.Formatting.InlineFormatting
elementFormatting Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting
Methods
| Name | Description |
|---|---|
| GetFormatMetadata | Inherited from InlineDraft. |
| SetFormatMetadata | Inherited from InlineDraft. |
Properties
| Name | Description |
|---|---|
| CustomData | Extension-specific custom data. Transferred to the resulting Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode.CustomData during document building. Inherited from InlineDraft. |
| ElementFormatting | Base-level element formatting (font, foreground, background, letter spacing). Inherited from InlineDraft. |
| FormatMetadata | Format-specific metadata for round-trip preservation (e.g. RTF underline variant). Transferred to the resulting Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode during document building. Inherited from InlineDraft. |
| Formatting | Inline-specific formatting (text decorations, baseline alignment). Inherited from InlineDraft. |
| Inlines | Gets the mutable list of child inline drafts. Inherited from InlineDraft. |
| InsertObjectReplacementCharacter | When true, an object replacement character (U+FFFC) is inserted into the text stream during document building, giving this inline a non-zero length so the rendering pipeline can discover it. Set this for embedded objects (images, etc.) that have no text content. |
| Kind | Gets the Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind that identifies this draft's inline type. Inherited from InlineDraft. |
InsertObjectReplacementCharacter Property
When true, an object replacement character (U+FFFC) is inserted
into the text stream during document building, giving this inline a
non-zero length so the rendering pipeline can discover it.
Set this for embedded objects (images, etc.) that have no text content.
public bool InsertObjectReplacementCharacter { get; set; }