Skip to main content

InlineFormatting Struct

Definition​

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

Inline-specific formatting snapshot. Value type for zero-reference safety. Contains only properties specific to Avalonia.Controls.Documents.RichInline elements.

public struct InlineFormatting

Inheritance: ValueType -> InlineFormatting

Implements: IEquatable<InlineFormatting>

Remarks​

Base-level properties (font, foreground, background, letter spacing) are stored in Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting on the Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode. This struct holds the remaining inline-only properties: text decorations and baseline alignment.

Methods​

NameDescription
Equals (2 overloads)No summary available.
GetHashCodeNo summary available.
ToStringNo summary available.

Equals overloads​

Equals Method​

public bool Equals(Avalonia.Controls.Documents.TextModel.Formatting.InlineFormatting other)
Parameters​

other Avalonia.Controls.Documents.TextModel.Formatting.InlineFormatting

Returns​

bool

Equals Method​

public bool Equals(object obj)
Parameters​

obj object

Returns​

bool

GetHashCode Method​

public int GetHashCode()

Returns​

int

ToString Method​

public string ToString()

Returns​

string

Properties​

NameDescription
BaselineAlignmentThe baseline alignment (e.g., Baseline, Superscript, Subscript). Null means not explicitly set.
DefaultDefault formatting with no explicit values set.
HasOverlineGets whether overline decoration is applied.
HasStrikethroughGets whether strikethrough decoration is applied.
HasSuperOrSubscriptGets whether any superscript or subscript flag is set.
HasUnderlineGets whether underline decoration is applied.
IsSubscriptWhether this inline is subscript. The higher layer decides how to represent this (BaselineAlignment, FontFeatures, etc.).
IsSuperscriptWhether this inline is superscript. The higher layer decides how to represent this (BaselineAlignment, FontFeatures, etc.).
TextDecorationsText decoration flags (underline, strikethrough, overline). Null means not explicitly set.
UnderlineStyleThe line style of the underline. Only takes effect when Avalonia.Controls.Documents.TextModel.Formatting.TextDecorationFlags.Underline is set in Avalonia.Controls.Documents.TextModel.Formatting.InlineFormatting.TextDecorations. Null means not explicitly set and renders as Avalonia.Controls.Documents.TextModel.Formatting.UnderlineStyle.Single.

BaselineAlignment Property​

The baseline alignment (e.g., Baseline, Superscript, Subscript). Null means not explicitly set.

public Nullable<Avalonia.Media.BaselineAlignment> BaselineAlignment { get; set; }

Default Property​

Default formatting with no explicit values set.

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

HasOverline Property​

Gets whether overline decoration is applied.

public bool HasOverline { get; set; }

HasStrikethrough Property​

Gets whether strikethrough decoration is applied.

public bool HasStrikethrough { get; set; }

HasSuperOrSubscript Property​

Gets whether any superscript or subscript flag is set.

public bool HasSuperOrSubscript { get; set; }

HasUnderline Property​

Gets whether underline decoration is applied.

public bool HasUnderline { get; set; }

IsSubscript Property​

Whether this inline is subscript. The higher layer decides how to represent this (BaselineAlignment, FontFeatures, etc.).

public bool IsSubscript { get; set; }

IsSuperscript Property​

Whether this inline is superscript. The higher layer decides how to represent this (BaselineAlignment, FontFeatures, etc.).

public bool IsSuperscript { get; set; }

TextDecorations Property​

Text decoration flags (underline, strikethrough, overline). Null means not explicitly set.

public Nullable<Avalonia.Controls.Documents.TextModel.Formatting.TextDecorationFlags> TextDecorations { get; set; }

UnderlineStyle Property​

The line style of the underline. Only takes effect when Avalonia.Controls.Documents.TextModel.Formatting.TextDecorationFlags.Underline is set in Avalonia.Controls.Documents.TextModel.Formatting.InlineFormatting.TextDecorations. Null means not explicitly set and renders as Avalonia.Controls.Documents.TextModel.Formatting.UnderlineStyle.Single.

public Nullable<Avalonia.Controls.Documents.TextModel.Formatting.UnderlineStyle> UnderlineStyle { get; set; }