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 the incorrect word.

Syntax

public string CorrectedWord { get; set; }

Examples

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

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

Remarks

This property returns an exception, if the current IncorrectWordChangingEventArgs.Type property is not type of Replace.