TX Spell .NET for Windows Forms

CorrectedWord Property

Property|Introduced in 3.0
Namespace
TXTextControl.Proofing
Package
TXTextControl.TXSpell.WinForms.SDK as TXSpell.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TXSpell.Core.SDK as TXSpell.dll

Description

Gets or sets the new word that replaces the text of an object of type TXTextControl.MisspelledWord.

Syntax

public string CorrectedWord { get; set; }

Examples

The following example uses MisspelledWordChangingEventArgs.CorrectedWord to configure corrected word as part of the misspelled word changing event args workflow. The configured value is checked before the workflow continues.

misspelledWordChangingEventArgs.CorrectedWord = "Quarterly report";
if (!string.IsNullOrWhiteSpace(misspelledWordChangingEventArgs.CorrectedWord))
{
    Console.WriteLine($"Corrected Word: {misspelledWordChangingEventArgs.CorrectedWord}");
}

Remarks

That property returns an exception, if the current MisspelledWordChangingEventArgs.Type property is not type of Replace.