IEditorViewTextChangeOptions Interface
Provides the base requirements for options that are applied to an ITextChange, and are created from an IEditorView.
public interface IEditorViewTextChangeOptions : ITextChangeOptions
Properties
BlockEditRangeAdjustFunc
A function that can adjust a block selection line's character Range prior to modification.
Func<ITextViewLine, Range, Range>? BlockEditRangeAdjustFunc { get; set; }
Property Value
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText(ITextChangeType, string?, IEditorViewTextChangeOptions?). This property is generally used to handle zero-width character Range scenarios during block edits.
CanApplyToBlockEdit
Indicates whether the text change can apply to each line in a block edit when applicable.
bool CanApplyToBlockEdit { get; set; }
Property Value
- bool:
trueif the text change can apply to each line in a block edit when applicable; otherwise,false. The default value isfalse.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText(ITextChangeType, string?, IEditorViewTextChangeOptions?).
CanApplyToMultipleSelections
Indicates whether the text change can apply to multiple selections.
bool CanApplyToMultipleSelections { get; set; }
Property Value
- bool:
trueif the text change can apply to multiple selections; otherwise,false. The default value isfalse.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText(ITextChangeType, string?, IEditorViewTextChangeOptions?).
When false, the text change will only apply to the primary selection when there are multiple selections.
IsBlock
Indicates whether the text change is a block change.
bool IsBlock { get; set; }
Property Value
- bool:
trueif the text change is a block change; otherwise,false. The default value isfalse.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText(ITextChangeType, string?, IEditorViewTextChangeOptions?).
SelectInsertedText
Indicates whether to select the text that is inserted into the document.
bool SelectInsertedText { get; set; }
Property Value
- bool:
trueif the inserted text should be selected; otherwise,false. The default value isfalse.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText(ITextChangeType, string?, IEditorViewTextChangeOptions?).
VirtualCharacterFill
Indicates whether when at a virtual character position, the text change will insert whitespace into the document to fill up to the insertion point's TextPosition.
bool VirtualCharacterFill { get; set; }
Property Value
- bool:
trueif whitespace will be inserted; otherwise,false. The default value istrue.
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText(ITextChangeType, string?, IEditorViewTextChangeOptions?). It is generally used by text changes such as line feed insertion or open line actions.
ZeroLengthEditRangeAdjustFunc
A function that can adjust a zero-width selection's position range prior to modification.
Func<TextPosition, TextPositionRange>? ZeroLengthEditRangeAdjustFunc { get; set; }
Property Value
Remarks
This option is only used in editor view change methods such as ReplaceSelectedText(ITextChangeType, string?, IEditorViewTextChangeOptions?).
Inherited Members
- ITextChangeOptions.CanMergeIntoPreviousChange
- ITextChangeOptions.CustomData
- ITextChangeOptions.CheckReadOnly
- ITextChangeOptions.OffsetDelta
- ITextChangeOptions.RetainSelection
- ITextChangeOptions.Source