Ignore Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Changes the text of the specified misspelled word and marks it as ignored. Ignored misspelled words are not underlined with a red zigzag line.
Syntax
public bool Ignore(MisspelledWord misspelledWord, string changedText);Public Function Ignore(misspelledWord As MisspelledWord, changedText As String) As BooleanParameters
| Parameter | Description |
|---|---|
| misspelledWord | Specifies the misspelled word to change. |
| changedText | Specifies the changed text. The current text of the word is replaced with this text. |
Return Value
The return value is true, if the misspelled word could be changed. Otherwise, it is false.
Examples
The following example works with misspelled words in the current document by using MisspelledWordCollection.Ignore.
MisspelledWordCollection misspelledWordCollection = textControl.MisspelledWords;
if (misspelledWordCollection.Ignore(new MisspelledWord(1, 1), "Quarterly results"))
{
Console.WriteLine("Ignore completed successfully.");
}Dim misspelledWordCollection As MisspelledWordCollection = textControl.MisspelledWords
If misspelledWordCollection.Ignore(New MisspelledWord(1, 1), "Quarterly results") Then
Console.WriteLine("Ignore completed successfully.")
End If