Class UIHighlightedTextSpan
Represents a highlighted span in a text.
Inherited Members
Namespace: DevToys.Api
Assembly: DevToys.Api.dll
Syntax
public record UIHighlightedTextSpan : TextSpan, IEquatable<TextSpan>, IEquatable<UIHighlightedTextSpan>
Constructors
UIHighlightedTextSpan(TextSpan, UIHighlightedTextSpanColor)
Initializes a new instance of the UIHighlightedTextSpan class based on the original TextSpan.
Declaration
public UIHighlightedTextSpan(TextSpan span, UIHighlightedTextSpanColor color = UIHighlightedTextSpanColor.Default)
Parameters
Type | Name | Description |
---|---|---|
TextSpan | span | The location where the text document should be highlighted TextSpan. |
UIHighlightedTextSpanColor | color | The color of the highlighted text span. |
UIHighlightedTextSpan(int, int, UIHighlightedTextSpanColor)
Initializes a new instance of the UIHighlightedTextSpan class.
Declaration
public UIHighlightedTextSpan(int startPosition, int length, UIHighlightedTextSpanColor color = UIHighlightedTextSpanColor.Default)
Parameters
Type | Name | Description |
---|---|---|
int | startPosition | The start position of the highlighted text span. |
int | length | The length of the highlighted text span. |
UIHighlightedTextSpanColor | color | The color of the highlighted text span. |
Properties
Color
Gets the color of the highlighted text span.
Declaration
public UIHighlightedTextSpanColor Color { get; }
Property Value
Type | Description |
---|---|
UIHighlightedTextSpanColor |