TX Spell .NET for WPF

CheckCorrectedWord Method

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

Description

Returns a value whether the specified word was found in one of the current selected suggestion dictionaries or not.

Syntax

public bool CheckCorrectedWord(string correctedWord, out string messageText);

Parameters

ParameterDescription
correctedWord

The specified word to check.

messageText

If the specified word was not found in one of the current selected suggestion dictionaries, the parameter is set to a message which informs the user about the result of this request. Otherwise it is set to an empty string.

Return Value

True if the specified word was found in one of the current selected suggestion dictionaries. Otherwise false.

Examples

The following example uses Check Corrected Word in a focused Correction Handler workflow.

string messageText = "Quarterly results";
if (correctionHandler.CheckCorrectedWord("Quarterly report", out messageText))
{
    Console.WriteLine("Check Corrected Word completed successfully.");
}

Remarks

This method is only enabled if the SpellingCorrectionUIProvider's mode is set to SuggestionsCreated or WordToCorrectEditing.