In This Article

TextChangeOptions Class

Represents options that are applied to an ITextChange.

public class TextChangeOptions : ITextChangeOptions
Inheritance:
object object
Derived:
EditorViewTextChangeOptions
Implements:
ITextChangeOptions

Constructors

TextChangeOptions()

Initializes a new instance of the TextChangeOptions class.

public TextChangeOptions()

Properties

CanMergeIntoPreviousChange

Gets or sets whether this text change can merge into the previous text change in the undo stack.

public bool CanMergeIntoPreviousChange { get; set; }

Property Value

bool:

true if this text change can merge into the previous text change in the undo stack; otherwise, false.

CheckReadOnly

Gets or sets whether to prevent the text change from occurring if the text range to modify is flagged as read-only.

public bool CheckReadOnly { get; set; }

Property Value

bool:

true if the read-only state should be checked; otherwise, false.

CustomData

Gets or sets custom data that can be persisted with the text change and restored when undo operations occur later on.

public object CustomData { get; set; }

Property Value

object:

The custom data.

Remarks

This custom data is only persisted for the root text change of a set of operations.

OffsetDelta

Gets or sets how an ITextChange's ITextChangeOperation offsets are modified based on previously-added operations.

public TextChangeOffsetDelta OffsetDelta { get; set; }

Property Value

TextChangeOffsetDelta:

A TextChangeOffsetDelta value indicating how to apply offset deltas, if at all.

RetainSelection

Gets or sets whether to prevent the caret from moving to the end of the text change in the active view.

public bool RetainSelection { get; set; }

Property Value

bool:

true if the caret move should be prevented; otherwise, false.

Source

Gets or sets the optional source of the text change, which is most often an editor view if specified.

public object Source { get; set; }

Property Value

object:

The optional source of the text change, which is most often an editor view if specified.

Inherited Members