InlineDraft Class
Definition
Base class for mutable inline draft elements consumed by Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder. Drafts are pre-offset authoring DTOs that the builder converts into immutable Avalonia.Controls.Documents.Serialization.Snapshot.InlineSnapshotNode instances.
public class InlineDraft
Remarks
Drafts are mutable for convenience while parsing/importing. Once handed to the builder they are read once and discarded; the resulting snapshot tree is the thread-safe immutable view of the document.
Methods
| Name | Description |
|---|---|
| GetFormatMetadata | No summary available. |
| SetFormatMetadata | No summary available. |
GetFormatMetadata Method
public T GetFormatMetadata<T>()
Type Parameters
T
Returns
T
SetFormatMetadata Method
public void SetFormatMetadata<T>(T metadata)
Parameters
metadata T
Type Parameters
T
Properties
| Name | Description |
|---|---|
| CustomData | Extension-specific custom data. Transferred to the resulting Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode.CustomData during document building. |
| ElementFormatting | Base-level element formatting (font, foreground, background, letter spacing). |
| 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. |
| Formatting | Inline-specific formatting (text decorations, baseline alignment). |
| Inlines | Gets the mutable list of child inline drafts. |
| Kind | Gets the Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind that identifies this draft's inline type. |
CustomData Property
Extension-specific custom data. Transferred to the resulting Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode.CustomData during document building.
public object CustomData { get; set; }
ElementFormatting Property
Base-level element formatting (font, foreground, background, letter spacing).
public Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting ElementFormatting { get; set; }
FormatMetadata Property
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.
public object FormatMetadata { get; set; }
Formatting Property
Inline-specific formatting (text decorations, baseline alignment).
public Avalonia.Controls.Documents.TextModel.Formatting.InlineFormatting Formatting { get; set; }
Inlines Property
Gets the mutable list of child inline drafts.
public System.Collections.Generic.IList<Avalonia.Controls.Documents.Serialization.Authoring.InlineDraft> Inlines { get; set; }
Kind Property
Gets the Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind that identifies this draft's inline type.
public Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind Kind { get; set; }