Skip to main content

InlineDraft Class

Definition​

Assembly:Avalonia.Controls.Documents
Package:Avalonia.Controls.Documents

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​

NameDescription
GetFormatMetadataNo summary available.
SetFormatMetadataNo 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​

NameDescription
CustomDataExtension-specific custom data. Transferred to the resulting Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode.CustomData during document building.
ElementFormattingBase-level element formatting (font, foreground, background, letter spacing).
FormatMetadataFormat-specific metadata for round-trip preservation (e.g. RTF underline variant). Transferred to the resulting Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode during document building.
FormattingInline-specific formatting (text decorations, baseline alignment).
InlinesGets the mutable list of child inline drafts.
KindGets 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; }