In This Article

EditorViewTextChangeOptions Class

Represents options that are applied to an ITextChange, and are created from an IEditorView.

public class EditorViewTextChangeOptions : TextChangeOptions, IEditorViewTextChangeOptions, ITextChangeOptions
Inheritance:
object TextChangeOptions object
Implements:
IEditorViewTextChangeOptions ITextChangeOptions

Constructors

EditorViewTextChangeOptions()

Initializes a new instance of the EditorViewTextChangeOptions class.

public EditorViewTextChangeOptions()

EditorViewTextChangeOptions(object)

Initializes a new instance of the EditorViewTextChangeOptions class.

public EditorViewTextChangeOptions(object source)
Parameter Type Description
source object

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

Properties

BlockEditRangeAdjustFunc

Gets or sets a function that can adjust a block selection line's character Range prior to modification.

public Func<ITextViewLine, Range, Range> BlockEditRangeAdjustFunc { get; set; }

Property Value

Func<ITextViewLine, Range, Range>:

A function that can adjust a block selection line's character Range prior to modification.

Remarks

This option is only used in editor view change methods such as ReplaceSelectedText. This property is generally used to handle zero-width character Range scenarios during block edits.

CanApplyToBlockEdit

Gets or sets whether the text change can apply to each line in a block edit when applicable.

public bool CanApplyToBlockEdit { get; set; }

Property Value

bool:

true if the text change can apply to each line in a block edit when applicable; otherwise, false. The default value is false.

Remarks

This option is only used in editor view change methods such as ReplaceSelectedText.

CanApplyToMultipleSelections

Gets or sets whether the text change can apply to multiple selections.

public bool CanApplyToMultipleSelections { get; set; }

Property Value

bool:

true if the text change can apply to multiple selections; otherwise, false. The default value is false.

Remarks

This option is only used in editor view change methods such as ReplaceSelectedText. When false, the text change will only apply to the primary selection when there are multiple selections.

IsBlock

Gets or sets whether the text change is a block change.

public bool IsBlock { get; set; }

Property Value

bool:

true if the text change is a block change; otherwise, false. The default value is false.

Remarks

This option is only used in editor view change methods such as ReplaceSelectedText.

SelectInsertedText

Gets or sets whether to select the text that is inserted into the document.

public bool SelectInsertedText { get; set; }

Property Value

bool:

true if the inserted text should be selected; otherwise, false. The default value is false.

Remarks

This option is only used in editor view change methods such as ReplaceSelectedText.

VirtualCharacterFill

Gets or sets 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.

public bool VirtualCharacterFill { get; set; }

Property Value

bool:

true if whitespace will be inserted; otherwise, false. The default value is true.

Remarks

This option is only used in editor view change methods such as ReplaceSelectedText. It is generally used by text changes such as line feed insertion or open line actions.

ZeroLengthEditRangeAdjustFunc

Gets or sets a function that can adjust a zero-width selection's position range prior to modification.

public Func<TextPosition, TextPositionRange> ZeroLengthEditRangeAdjustFunc { get; set; }

Property Value

Func<TextPosition, TextPositionRange>:

A function that can adjust a zero-width selection's position range prior to modification.

Remarks

This option is only used in editor view change methods such as ReplaceSelectedText.

Inherited Members