EditorSnapshotChangingEventArgs Class
Event arguments for the SyntaxEditor.DocumentTextChanging event.
public class EditorSnapshotChangingEventArgs : CancelRoutedEventArgs
- Inheritance:
- object EventArgs RoutedEventArgs CancelRoutedEventArgs object
Constructors
EditorSnapshotChangingEventArgs(ITextSnapshot?, ITextSnapshot?, ITextChange)
Event arguments for the SyntaxEditor.DocumentTextChanging event.
public EditorSnapshotChangingEventArgs(ITextSnapshot? oldSnapshot, ITextSnapshot? newSnapshot, ITextChange textChange)
| Parameter | Type | Description |
|---|---|---|
| oldSnapshot | ITextSnapshot | The ITextSnapshot that is in effect before the text change is applied. |
| newSnapshot | ITextSnapshot | The ITextSnapshot that is in effect after the text change is applied. |
| textChange | ITextChange | The ITextChange that is made. |
Properties
IsTypedWordStart
Indicates whether the text change is a Typing type that starts a word.
public bool IsTypedWordStart { get; }
Property Value
NewSnapshot
The ITextSnapshot that is in effect after the text change is applied.
public ITextSnapshot? NewSnapshot { get; }
Property Value
Remarks
This property value may be null before the text change actually occurs.
OldSnapshot
The ITextSnapshot that is in effect before the text change is applied.
TextChange
The ITextChange that is made to the document, causing a transition from OldSnapshot to NewSnapshot.
TypedText
The text that was typed, if the text change is a Typing type, and didn't originate from an undo/redo.
public string? TypedText { get; }
Property Value
Remarks
This a helper property that is very useful for searching for things such as when a "." is typed so you know when to activate an IntelliPrompt completion list.
Inherited Members
- CancelRoutedEventArgs.Cancel
- EventArgs.Empty
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()