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. |
| 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.csStart
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. |