InlineWrapper Struct
Definition
One level of an inline wrapper chain: the kind of the wrapping element and the formatting it carries. The value-type counterpart of a wrapper Avalonia.Controls.Documents.Serialization.Authoring.InlineDraft, for Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.AddRun(ReadOnlyMemory{char},Avalonia.Controls.Documents.TextModel.Formatting.InlineFormatting,Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting,ReadOnlySpan{Avalonia.Controls.Documents.Serialization.Authoring.InlineWrapper},object).
public struct 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
| Name | Description |
|---|---|
| InlineWrapper | Initializes 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
| Name | Description |
|---|---|
| Equals (2 overloads) | No summary available. |
| GetHashCode | No summary available. |
| Span | A span wrapper carrying arbitrary formatting, matching Avalonia.Controls.Documents.Serialization.Authoring.SpanInlineDraft. This is where formatting that no named wrapper represents belongs. |
| ToString | No 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
| Name | Description |
|---|---|
| Bold | A bold wrapper, matching Avalonia.Controls.Documents.Serialization.Authoring.BoldInlineDraft. |
| ElementFormatting | Gets the element formatting the wrapper carries (font, foreground, background). |
| Formatting | Gets the inline formatting the wrapper carries (text decorations, baseline alignment). |
| Italic | An italic wrapper, matching Avalonia.Controls.Documents.Serialization.Authoring.ItalicInlineDraft. |
| Kind | Gets the Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind of the wrapping element. |
| Subscript | A subscript wrapper, matching Avalonia.Controls.Documents.Serialization.Authoring.SubscriptInlineDraft. |
| Superscript | A superscript wrapper, matching Avalonia.Controls.Documents.Serialization.Authoring.SuperscriptInlineDraft. |
| Underline | An 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; }