コンテンツにスキップ

TextSpan クラス

文字列とその書式を表すテキスト範囲です。

名前空間: FloatSoda.RenderObjects
アセンブリ: FloatSoda.dll

public record TextSpan : IEquatable<TextSpan>

object ← TextSpan

IEquatable<TextSpan>

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

指定した文字列を含むテキスト範囲を初期化します。

public TextSpan(string text)

text string

この範囲に含める文字列。空文字列も指定できます。

ArgumentNullException

textがnullです。

この範囲へ適用する書式を取得します。

public TextStyle? Style { get; init; }

TextStyle?

nullの場合、構築時に渡された既定の書式を使用します。

この範囲に含める文字列を取得します。

public string Text { get; init; }

string

ArgumentNullException

値がnullです。