ITextChangeOptions Interface
Provides the base requirements for options that are applied to an ITextChange.
public interface ITextChangeOptions
Properties
CanMergeIntoPreviousChange
Gets or sets whether this text change can merge into the previous text change in the undo stack, assuming one is available.
bool CanMergeIntoPreviousChange { get; set; }
Property Value
- Boolean:
true
if this text change can merge into the previous text change in the undo stack; otherwise,false
.
Remarks
When true
, if an undo occurs after this text change, this text change's operations along with those of the previous text change would occur
as a single undoable text change.
CheckReadOnly
Gets or sets whether to prevent the text change from occurring if the text range to modify is flagged as read-only.
bool CheckReadOnly { get; set; }
Property Value
- Boolean:
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.
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.
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.
bool RetainSelection { get; set; }
Property Value
- Boolean:
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.
object Source { get; set; }
Property Value
- Object:
The optional source of the text change, which is most often an editor view if specified.