Version

TextDocument Class Members

The following tables list the members exposed by TextDocument.

Public Constructors
 NameDescription
Public ConstructorTextDocument ConstructorInitializes a new TextDocument  
Public Properties
 NameDescription
Public PropertyAutoCasingModeGets or sets the auto-casing behaviors to use when the language has case-insensitive keywords and other terminal symbols.  
Public PropertyCurrentSnapshotReturns a snapshot representing the current version of the document (read-only).  
Public PropertyFileNameReturns the name of the file passed into the Load(String) method (read-only)  
Public PropertyIsReadOnlyReturns/sets whether or not the text in the document can be changed.  
Public PropertyLanguageReturns/sets the associated language  
Public PropertyNewLineSequenceReturns/sets the sequence of characters used to delimit lines in the document.  
Public PropertySyntaxTreeReturns the syntax parse tree (read-only)  
Public PropertyTabEntryBehaviorReturns/sets what gets inserted into a document when a tab key is entered..  
Public PropertyTabExtentReturns/sets the number of spaces a tab character represents.  
Public PropertyUndoManagerReturns/sets the object that manages the undo/redo stacks  
Public Methods
 NameDescription
Public MethodAppendAppends text to the end of the document  
Public MethodClearUndoRedoHistoryRemoves all the Undo and Redo history that relates to this TextDocument.  
Public MethodCreateTagAggregator<T>Returns a DocumentTagAggregator that can aggregate ITags of type T.  
Public MethodDeleteOverloaded. Removes all text from this document.  
Public MethodFindReplaceOverloaded. Finds an instance of text in the document that matches the search criteria and replaces it with another string.  
Public MethodFindReplaceAllReplaces all instances of text in the document that matches the search criteria.  
Public MethodIndentLinesIndents a block of lines (i.e. inserts leading whitepsace).  
Public MethodInitializeTextInitializes all of the text in the document.  
Public MethodInsertInserts text into the document at a specific offset  
Public MethodLoadOverloaded. Initializes the document with text from the specified file.  
Public MethodOutdentLinesOutdents a block of lines (i.e. removes leading whitepsace).  
Public MethodParseParses the document synchronously.  
Public MethodParseAsyncParses the document on a background thread.  
Public Methodstatic (Shared in Visual Basic)RegisterResourcesAdds an additonal Resx file in which the control will pull its resources from.  
Public MethodReplaceOverloaded. Replaces a range of text in the document with a new string.  
Public MethodSaveOverloaded. Saves the document to the file specified via a previous call to the Load(String) method.  
Public Methodstatic (Shared in Visual Basic)UnregisterResourcesRemoves a previously registered resx file.  
Protected Methods
 NameDescription
Protected MethodOnTextChangedInvokes the TextChanged event.  
Protected MethodOnTextChangingInvokes the TextChanging event.  
Protected MethodOnTextLoadedOccurs after either the Load or InitializeText method is called.  
Public Events
 NameDescription
Public EventPropertyChangedOcuurs after a property value has changed  
Public EventTextChangedOccurs after changes have been made to the document's text.  
Public EventTextChangingOccurs before changes are made to the document's text.  
Public EventTextLoadedOccurs after either the Load or the InitializeText method is called.  
See Also