TextSpan Struct
A part of a RichText that has one style.
public readonly struct TextSpan : IEquatable<TextSpan>- Implements
Properties
| Name | Description |
|---|---|
| IsPlaceholder | Gets a value indicating whether the span is a placeholder: one character (U+FFFC) that takes, in its line, the room of what the caller draws there. See RichTextBuilder.AppendPlaceholder. |
| Length | Gets the number of characters of the span, in UTF-16 code units. |
| RubyStyle | Gets the style of the annotation of a ruby, or null for a span that is not the base of a ruby. |
| RubyText | Gets the annotation of the span when it is the base of a ruby, or null: a text set beside the text of the span, above it in a horizontal line and on its right in a vertical one. See RichTextBuilder.AppendRuby. |
| Start | Gets the index of the first character of the span in the text. |
| Style | Gets the style of the span. |
IsPlaceholder
TextSpan.csGets a value indicating whether the span is a placeholder: one character (U+FFFC) that takes, in its line, the room of what the caller draws there. See RichTextBuilder.AppendPlaceholder.
public bool IsPlaceholder { get; }Property value
Length
TextSpan.csRubyStyle
TextSpan.csGets the style of the annotation of a ruby, or null for a span that is not the base of a ruby.
public TextStyle? RubyStyle { get; }Property value
RubyText
TextSpan.csGets the annotation of the span when it is the base of a ruby, or null: a text set beside the text of the span, above it in a horizontal line and on its right in a vertical one. See RichTextBuilder.AppendRuby.
public string? RubyText { get; }Property value
Start
TextSpan.csStyle
TextSpan.csMethods
| Name | Description |
|---|---|
| Equals(TextSpan) | Indicates whether the current object is equal to another object of the same type. |
| Equals(object?) | Indicates whether this instance and a specified object are equal. |
| GetHashCode() | Returns the hash code for this instance. |
GetHashCode()
TextSpan.csOperators
| Name | Description |
|---|---|
| operator ==(TextSpan, TextSpan) | Determines whether two spans are the same part of a text with the same style. |
| operator !=(TextSpan, TextSpan) | Determines whether two spans differ. |