In This Article

VBIndentProvider Class

Provides a Visual Basic language indent provider service.

public class VBIndentProvider : IIndentProvider, IEditorDocumentTextChangeEventSink
Inheritance:
Object Object
Implements:
IIndentProvider IEditorDocumentTextChangeEventSink

Constructors

VBIndentProvider()

public VBIndentProvider()

Properties

Mode

Gets the IndentMode that specifies the mode by which to indent text.

public IndentMode Mode { get; }

Property Value

IndentMode:

The IndentMode that specifies the mode by which to indent text.

Methods

GetIndentAmount(TextSnapshotOffset, Int32)

Returns the ideal amount of indent, always in columns, for the line containing the snapshot offset.

public int GetIndentAmount(TextSnapshotOffset snapshotOffset, int defaultAmount)
Parameter Type Description
snapshotOffset TextSnapshotOffset

The TextSnapshotOffset whose line should be examined.

defaultAmount Int32

The default indent amount, which is the amount used in Block mode.

Returns

Int32:

The ideal amount of indent, always in columns, for the line containing the snapshot offset.

Remarks

This method is called when the IndentMode is Smart. The containing ITextDocument is accessible via the snapshot range's ITextSnapshot.

OnDocumentTextChanged(SyntaxEditor, EditorSnapshotChangedEventArgs)

Occurs after a text change occurs to an IEditorDocument that uses this language.

protected virtual void OnDocumentTextChanged(SyntaxEditor editor, EditorSnapshotChangedEventArgs e)
Parameter Type Description
editor SyntaxEditor

The SyntaxEditor whose IEditorDocument is changed.

e EditorSnapshotChangedEventArgs

The EditorSnapshotChangedEventArgs that contains the event data.

OnDocumentTextChanging(SyntaxEditor, EditorSnapshotChangingEventArgs)

Occurs before a text change occurs to an IEditorDocument that uses this language.

protected virtual void OnDocumentTextChanging(SyntaxEditor editor, EditorSnapshotChangingEventArgs e)
Parameter Type Description
editor SyntaxEditor

The SyntaxEditor whose IEditorDocument that is changing.

e EditorSnapshotChangingEventArgs

The EditorSnapshotChangingEventArgs that contains the event data.

Explicit Interface Implementations

IEditorDocumentTextChangeEventSink.NotifyDocumentTextChanged(SyntaxEditor, EditorSnapshotChangedEventArgs)

Notifies after a text change occurs to an IEditorDocument.

void IEditorDocumentTextChangeEventSink.NotifyDocumentTextChanged(SyntaxEditor editor, EditorSnapshotChangedEventArgs e)
Parameter Type Description
editor SyntaxEditor

The SyntaxEditor whose IEditorDocument is changed.

e EditorSnapshotChangedEventArgs

The EditorSnapshotChangedEventArgs that contains the event data.

IEditorDocumentTextChangeEventSink.NotifyDocumentTextChanging(SyntaxEditor, EditorSnapshotChangingEventArgs)

Notifies before a text change occurs to an IEditorDocument.

void IEditorDocumentTextChangeEventSink.NotifyDocumentTextChanging(SyntaxEditor editor, EditorSnapshotChangingEventArgs e)
Parameter Type Description
editor SyntaxEditor

The SyntaxEditor whose IEditorDocument that is changing.

e EditorSnapshotChangingEventArgs

The EditorSnapshotChangingEventArgs that contains the event data.

Inherited Members