In This Article

ITextProvider Interface

Provides the base requirements for an object that supplies to an ITextLayout.

public interface ITextProvider

Properties

FirstNonWhitespaceCharacterIndex

The first non-whitespace character index.

int FirstNonWhitespaceCharacterIndex { get; }

Property Value

int

Length

The total number of available text characters.

int Length { get; }

Property Value

int

Spacers

The collection of intra-text spacers.

IList<ITextSpacer>? Spacers { get; }

Property Value

IList<ITextSpacer>

Methods

GetSubstring(int, int)

Returns a substring range of the text.

string GetSubstring(int characterIndex, int characterCount)
Parameter Type Description
characterIndex int

The start character index.

characterCount int

The number of characters in the range.

Returns

string

Translate(int, TextProviderTranslateModes)

Translates the specified character index.

int Translate(int characterIndex, TextProviderTranslateModes modes)
Parameter Type Description
characterIndex int

The character index to translate.

modes TextProviderTranslateModes

A TextProviderTranslateModes indicating the translate modes to use.

Returns

int

Extension Methods