In This Article

IUndoableTextChange Interface

Provides the base requirements for a single undoable text change unit.

public interface IUndoableTextChange

Remarks

This interface only stores the necessary information to reconstruct an ITextChange for undo/redo purposes.

Properties

CustomData

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

object CustomData { get; }

Property Value

object:

The custom data.

Description

Gets the description of the contents of the text change, usually displayed in the user interface.

string Description { get; }

Property Value

string:

The description of the contents of the text change, usually displayed in the user interface.

IsMerged

Gets whether this text change is the result of a merge of two or more text changes.

bool IsMerged { get; }

Property Value

bool:

true if this text change is the result of a merge of two or more text changes; otherwise, false.

Operations

Gets the read-only list of ITextChangeOperation objects that make up this text change.

IList<ITextChangeOperation> Operations { get; }

Property Value

IList<ITextChangeOperation>:

The read-only list of ITextChangeOperation objects that make up this text change.

PostSelectionPositionRanges

Gets or sets the collection of sorted non-overlapping TextPositionRange objects that should be selected in the source view after the text change is applied.

ITextPositionRangeCollection PostSelectionPositionRanges { get; set; }

Property Value

ITextPositionRangeCollection:

The collection of sorted non-overlapping TextPositionRange objects that should be selected in the source view after the text change is applied.

PreSelectionPositionRanges

Gets or sets the collection of sorted non-overlapping TextPositionRange objects that were selected in the source view before the text change is applied.

ITextPositionRangeCollection PreSelectionPositionRanges { get; set; }

Property Value

ITextPositionRangeCollection:

The collection of sorted non-overlapping TextPositionRange objects that were selected in the source view before the text change is applied.

RetainSelection

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

bool RetainSelection { get; }

Property Value

bool:

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

Type

Gets an ITextChangeType indicating the type of change that was made.

ITextChangeType Type { get; }

Property Value

ITextChangeType:

An ITextChangeType indicating the type of change that was made.