TX Text Control .NET for Windows Forms

Ignore Method

Method|Introduced in 18.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

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);

Parameters

ParameterDescription
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.");
}