RichTextKit v0.4

StyledText.InsertText Method

Assembly: Topten.RichTextKit.dll
Namespace: Topten.RichTextKit
Declaring Type: StyledText

Overloads

InsertText(int, StyledText)

Add all the text from another text block to this text block

InsertText(int, Utils.Slice<int>, IStyle)

Add text to this text block

InsertText(int, ReadOnlySpan<char>, IStyle)

Add text to this text block

InsertText(int, string, IStyle)

Add text to this text block

InsertText(int, StyledText)

Add all the text from another text block to this text block

public void InsertText(int offset, StyledText text);

Parameters

int offset

The position at which to insert the text

StyledText text

Text to add

InsertText(int, Utils.Slice<int>, IStyle)

Add text to this text block

public void InsertText(int position, Utils.Slice<int> text, IStyle style = null);

Remarks

If the style is null, the new text will acquire the style of the character before the insertion point. If the text block is currently empty the style must be supplied. If inserting at the start of a non-empty text block the style will be that of the first existing style run

Parameters

int position

The position to insert the text

Utils.Slice<int> text

The text to add

IStyle style = null

The style of the text (optional)

InsertText(int, ReadOnlySpan<char>, IStyle)

Add text to this text block

public void InsertText(int position, ReadOnlySpan<char> text, IStyle style = null);

Remarks

If the style is null, the new text will acquire the style of the character before the insertion point. If the text block is currently empty the style must be supplied. If inserting at the start of a non-empty text block the style will be that of the first existing style run

Parameters

int position

The position to insert the text

ReadOnlySpan<char> text

The text to add

IStyle style = null

The style of the text (optional)

InsertText(int, string, IStyle)

Add text to this text block

public void InsertText(int position, string text, IStyle style = null);

Remarks

If the style is null, the new text will acquire the style of the character before the insertion point. If the text block is currently empty the style must be supplied. If inserting at the start of a non-empty text block the style will be that of the first existing style run

Parameters

int position

The position to insert the text

string text

The text to add

IStyle style = null

The style of the text (optional)