MisspelledWordCollection Class
- Namespace
TXTextControl
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WinForms. SDK
- Assembly
TXTextControl.dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WinForms. SDK TXTextControl.from the setup.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, IEnumerablePublic Class MisspelledWordCollection
Implements ICollection, IEnumerableExamples
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.");Dim misspelledWordCollection As MisspelledWordCollection = textControl.MisspelledWords
Console.WriteLine("Misspelled Word Collection is ready for use.")Members
Properties
| Property | Description |
|---|---|
| Count | Gets the number of elements contained in the collection. |
| Item | Gets a misspelled word from the collection. In C# this property is the indexer for the MisspelledWordCollection class. |
Methods
| Method | Description |
|---|---|
| CopyTo | Copies the elements of the collection to an array, starting at a particular index. |
| GetCount | Returns the number of misspelled words with a special meaning from the collection. |
| GetEnumerator | Returns an enumerator that can be used to iterate through the collection. |
| GetItem | Gets a particular item from the collection. |
| Ignore | Changes the text of the specified misspelled word and marks it as ignored. Ignored misspelled words are not underlined with a red zigzag line. |
| Remove | Removes 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. |