Version

Search Results

FindReplace(String,TextSearchCriteria,TextSpan,Int32,Boolean) Method

Finds an instance of text in the document that matches the search criteria and replaces it with another string.. Syntax Parameters newText The new textcriteria The search criteriaspanToSearch The span of text to limit the search to.startOffset The start offset relative to the beginning of the document.wrapIfNotFou...

FindReplace Method

Finds an instance of text in the document that matches the search criteria and replaces it with another string. Overload List

FindReplaceAll Method

Replaces all instances of text in the document that matches the search criteria. Syntax Parameters criteria The search criteriareplacementText The new textspanToSearch An optional span to limit the scope of the find/replace Return Value A TextSearchResultInfo object containing the results of the operation. Excepti...

IndentLines Method

Indents a block of lines (i.e. inserts leading whitepsace). Syntax Parameters lineIndex The zero-based index of the first line to indent.lineCount The total number of lines to indent. Return Value True if the operation was successful, otherwise false. Exceptions Exception Description System.InvalidOperationExcepti...

InitializeText Method

Initializes all of the text in the document. Syntax Parameters text The text to Exceptions Exception Description System.InvalidOperationException if this method is called in the middle of an update operation, e.g. from within a TextChanging event handler. Remarks Note: this is equivalent to calling one of the Load...

Insert(Int32,String) Method

Inserts text into the document at a specific offset Syntax Parameters offset The zero-based offset where to insert the text.text The text to insert Return Value True if the operation was successful, otherwise false. Exceptions Exception Description System.InvalidOperationException If the IsReadOnly property is set...

Insert Method (TextDocument)

Inserts text into the document at a specific offset Overload List

IsReadOnly Property

Returns/sets whether or not the text in the document can be changed. Syntax Property Value False if the text can be edited, otherwise true.

Language Property (TextDocument)

Returns/sets the associated language Syntax Remarks Note: if this property is not set then the document will be treated as plain text with no syntax rules. In this case an instance of the PlainTextLanguage will be returned.

Load(Stream) Method

Initializes the document with text from a stream. Syntax Parameters stream The stream that contains the text. Return Value True if the operation was successful, otherwise false. Exceptions Exception Description System.ArgumentNullException if stream is null. System.InvalidOperationException if this method is calle...