XmlIndentProvider Class
Provides a XML language indent provider service.
public class XmlIndentProvider : IIndentProvider, IEditorDocumentTextChangeEventSink
- Inheritance:
- object object
- Implements:
- IIndentProvider IEditorDocumentTextChangeEventSink
Constructors
XmlIndentProvider()
Initializes an instance of the class.
public XmlIndentProvider()
Properties
Mode
The IndentMode that specifies the mode by which to indent text.
Methods
GetIndentAmount(TextSnapshotOffset, int)
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 | int | The default indent amount, which is the amount used in |
Returns
Remarks
This method is called when the Mode 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 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 event data. |
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()