InlineFormatting Struct
Definition
Inline-specific formatting snapshot. Value type for zero-reference safety. Contains only properties specific to Avalonia.Controls.Documents.RichInline elements.
public struct 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
| Name | Description |
|---|---|
| Equals (2 overloads) | No summary available. |
| GetHashCode | No summary available. |
| ToString | No 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
| Name | Description |
|---|---|
| BaselineAlignment | The baseline alignment (e.g., Baseline, Superscript, Subscript). Null means not explicitly set. |
| Default | Default formatting with no explicit values set. |
| HasOverline | Gets whether overline decoration is applied. |
| HasStrikethrough | Gets whether strikethrough decoration is applied. |
| HasSuperOrSubscript | Gets whether any superscript or subscript flag is set. |
| HasUnderline | Gets whether underline decoration is applied. |
| IsSubscript | Whether this inline is subscript. The higher layer decides how to represent this (BaselineAlignment, FontFeatures, etc.). |
| IsSuperscript | Whether this inline is superscript. The higher layer decides how to represent this (BaselineAlignment, FontFeatures, etc.). |
| TextDecorations | Text decoration flags (underline, strikethrough, overline). Null means not explicitly set. |
| UnderlineStyle | 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. |
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; }