TX Text Control .NET for WPF

MisspelledWord Class

Class|Introduced in 16.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.dll
Install
dotnet add package TXTextControl.TextControl.WPF.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.

Description

The MisspelledWord class represents a misspelled word in a document's text.

Syntax

public class MisspelledWord

Examples

The following example locates the first spelling issue in a short document.

textControl.Text = "The quaterly report is ready.";
MisspelledWord misspelledWord = textControl.MisspelledWords.GetItem();
if (misspelledWord == null)
{
    return;
}

Members

Constructors

ConstructorDescription
MisspelledWordInitializes a new instance of the MisspelledWord class with the specified starting position and length.

Properties

PropertyDescription
CultureGets the culture of the misspelled word. If there is no specific culture, the property value is null.
IsDuplicateGets or sets a value which marks the misspelled word as duplicate. A duplicate word is not misspelled, but it has the same text as the word in front of it.
IsIgnoredGets or sets a value which marks the misspelled word as ignored. An ignored misspelled word remains in the collection of misspelled words, but it is not underlined in the text with a red zigzag line.
LengthGets the length of a misspelled word.
NumberGets the number of this misspelled word. All misspelled words are counted from the beginning to the end of a document. The first word has the number 1.
StartGets the starting position of a misspelled word. It is a one-based index of the word's first character.
TextGets the text of the misspelled word.

Methods

MethodDescription
SelectSelects the misspelled word in the text.