Skip to main content

InlineWrapper Struct

Definition​

Assembly:Avalonia.Controls.Documents
Package:Avalonia.Controls.Documents
public struct InlineWrapper

Inheritance: ValueType -> InlineWrapper

Implements: IEquatable<InlineWrapper>

Remarks​

A reader that knows a run's whole chain up front - an innermost run inside bold inside underline, say - describes it as a span of these and pays nothing to describe it: the builder reads the span and constructs the snapshot nodes directly, where the draft path allocates a draft object, a child list, and that list's backing array per level.

Constructors​

NameDescription
InlineWrapperInitializes a wrapper of kind carrying the given formatting.

InlineWrapper Constructor​

Initializes a wrapper of kind carrying the given formatting.

public InlineWrapper(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​

NameDescription
Equals (2 overloads)No summary available.
GetHashCodeNo summary available.
SpanA span wrapper carrying arbitrary formatting, matching Avalonia.Controls.Documents.Serialization.Authoring.SpanInlineDraft. This is where formatting that no named wrapper represents belongs.
ToStringNo summary available.

Equals overloads​

Equals Method​

public bool Equals(Avalonia.Controls.Documents.Serialization.Authoring.InlineWrapper other)
Parameters​

other Avalonia.Controls.Documents.Serialization.Authoring.InlineWrapper

Returns​

bool

Equals Method​

public bool Equals(object obj)
Parameters​

obj object

Returns​

bool

GetHashCode Method​

public int GetHashCode()

Returns​

int

Span Method​

A span wrapper carrying arbitrary formatting, matching Avalonia.Controls.Documents.Serialization.Authoring.SpanInlineDraft. This is where formatting that no named wrapper represents belongs.

public Avalonia.Controls.Documents.Serialization.Authoring.InlineWrapper Span(Avalonia.Controls.Documents.TextModel.Formatting.InlineFormatting formatting, Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting elementFormatting)

Parameters​

formatting Avalonia.Controls.Documents.TextModel.Formatting.InlineFormatting

elementFormatting Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting

Returns​

Avalonia.Controls.Documents.Serialization.Authoring.InlineWrapper

ToString Method​

public string ToString()

Returns​

string

Properties​

NameDescription
BoldA bold wrapper, matching Avalonia.Controls.Documents.Serialization.Authoring.BoldInlineDraft.
ElementFormattingGets the element formatting the wrapper carries (font, foreground, background).
FormattingGets the inline formatting the wrapper carries (text decorations, baseline alignment).
ItalicAn italic wrapper, matching Avalonia.Controls.Documents.Serialization.Authoring.ItalicInlineDraft.
KindGets the Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind of the wrapping element.
SubscriptA subscript wrapper, matching Avalonia.Controls.Documents.Serialization.Authoring.SubscriptInlineDraft.
SuperscriptA superscript wrapper, matching Avalonia.Controls.Documents.Serialization.Authoring.SuperscriptInlineDraft.
UnderlineAn underline wrapper, matching Avalonia.Controls.Documents.Serialization.Authoring.UnderlineInlineDraft.

Bold Property​

A bold wrapper, matching Avalonia.Controls.Documents.Serialization.Authoring.BoldInlineDraft.

public Avalonia.Controls.Documents.Serialization.Authoring.InlineWrapper Bold { get; set; }

ElementFormatting Property​

Gets the element formatting the wrapper carries (font, foreground, background).

public Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting ElementFormatting { get; set; }

Formatting Property​

Gets the inline formatting the wrapper carries (text decorations, baseline alignment).

public Avalonia.Controls.Documents.TextModel.Formatting.InlineFormatting Formatting { get; set; }

Italic Property​

An italic wrapper, matching Avalonia.Controls.Documents.Serialization.Authoring.ItalicInlineDraft.

public Avalonia.Controls.Documents.Serialization.Authoring.InlineWrapper Italic { get; set; }

Kind Property​

Gets the Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind of the wrapping element.

public Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind Kind { get; set; }

Subscript Property​

A subscript wrapper, matching Avalonia.Controls.Documents.Serialization.Authoring.SubscriptInlineDraft.

public Avalonia.Controls.Documents.Serialization.Authoring.InlineWrapper Subscript { get; set; }

Superscript Property​

A superscript wrapper, matching Avalonia.Controls.Documents.Serialization.Authoring.SuperscriptInlineDraft.

public Avalonia.Controls.Documents.Serialization.Authoring.InlineWrapper Superscript { get; set; }

Underline Property​

An underline wrapper, matching Avalonia.Controls.Documents.Serialization.Authoring.UnderlineInlineDraft.

public Avalonia.Controls.Documents.Serialization.Authoring.InlineWrapper Underline { get; set; }