TX Text Control .NET Server

MisspelledWordCollection Class

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

Description

An instance of the MisspelledWordCollection class contains all misspelled words in the main part of a Text Control document. An instance of this class can be obtained with the TextControl.MisspelledWords, WPF.TextControl.MisspelledWords, HeaderFooter.MisspelledWords or TextFrame.MisspelledWords property. The MisspelledWordCollection class implements the IEnumerable and the ICollection interfaces. Misspelled words are represented through objects of the type MisspelledWord.

Syntax

public class MisspelledWordCollection : ICollection, IEnumerable

Examples

The following example works with misspelled words in the current document. The created object is then available to the surrounding document workflow.

MisspelledWordCollection misspelledWordCollection = textControl.MisspelledWords;
Console.WriteLine("Misspelled Word Collection is ready for use.");

Members

Properties

PropertyDescription
CountGets the number of elements contained in the collection.
ItemGets a misspelled word from the collection. In C# this property is the indexer for the MisspelledWordCollection class.

Methods

MethodDescription
CopyToCopies the elements of the collection to an array, starting at a particular index.
GetCountReturns the number of misspelled words with a special meaning from the collection.
GetEnumeratorReturns an enumerator that can be used to iterate through the collection.
GetItemGets a particular item from the collection.
IgnoreChanges the text of the specified misspelled word and marks it as ignored. Ignored misspelled words are not underlined with a red zigzag line.
RemoveRemoves the specified misspelled word from a Text Control document. The method removes the word's reference in the list of misspelled words, but not the word's text in the document. If text is specified, this text replaces the word's text.