New to Telerik UI for WPFStart a free 30-day trial

Represents a text change.

Definition

Namespace:Telerik.Windows.SyntaxEditor.Core.Text

Assembly:Telerik.Windows.SyntaxEditor.Core.dll

Syntax:

C#
public class TextChange

Inheritance: objectTextChange

Constructors

Initializes a new instance of the TextChange class.

C#
public TextChange(int oldPosition, string oldText, string newText)
Parameters:oldPositionintoldTextstringnewTextstring

Properties

Gets the difference in the new / old text lengths.

C#
public int Delta { get; }

Gets the inserted lines count.

C#
public int InsertedLineCount { get; }

Gets the line count difference.

C#
public int LineCountDelta { get; }

Gets the new span.

C#
public Span NewSpan { get; }

Gets the new text.

C#
public string NewText { get; }

Gets the old span.

C#
public Span OldSpan { get; }

Gets the old text.

C#
public string OldText { get; }

Methods

Reverses the text change.

C#
public TextChange Reverse()
Returns:

TextChange

Translates the given position.

C#
public int TranslatePosition(int position, PositionAnchoringType anchorType)
Parameters:positionintanchorTypePositionAnchoringTypeReturns:

int