In This Article

ITextProvider Interface

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

public interface ITextProvider

Properties

FirstNonWhitespaceCharacterIndex

Gets the first non-whitespace character index.

int FirstNonWhitespaceCharacterIndex { get; }

Property Value

int:

The first non-whitespace character index.

Length

Gets the total number of available text characters.

int Length { get; }

Property Value

int:

The total number of available text characters.

Spacers

Gets the collection of intra-text spacers.

IList<ITextSpacer> Spacers { get; }

Property Value

IList<ITextSpacer>:

The collection of intra-text spacers.

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:

The text substring.

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:

The translated character index.