TX Spell .NET for Windows Forms

DictionaryCollection Class

Class
Namespace
TXTextControl.Proofing
Package
TXTextControl.TXSpell.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXSpell.dll
Install
dotnet add package TXTextControl.TXSpell.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXSpell.dll from the setup.
Also in
TXTextControl.TXSpell.Core.SDK as TXSpell.dll
Inherits
  1. CollectionBase
  2. DictionaryCollection
Implements
IEnumerable, IEnumerator

Description

An instance of the DictionaryCollection class contains all initialized dictionaries represented through objects which are inherited from the abstract class Dictionary. It is inherited from the abstract class System.Collections.CollectionBase and implements the System.Collections.IEnumerable and System.Collections.IEnumerator interfaces. For a list of properties, methods and events of these classes and interfaces see the .NET Framework reference. TX Spell .NET provides the OpenOfficeDictionary and UserDictionary classes to create dictionaries that are compatible with the DictionaryCollection class.

Syntax

public sealed class DictionaryCollection : CollectionBase, IEnumerable, IEnumerator

Examples

The following example includes the current value from a Dictionary Collection object in application diagnostics. The created object is then available to the surrounding document workflow.

Console.WriteLine($"Current: {dictionaryCollection.Current}");
Console.WriteLine("Dictionary Collection is ready for use.");

Members

Properties

PropertyDescription
CurrentNot described in the reference. public object Current { get; }
HasEditableUserDictionariesGets a value indicating whether the dictionary collection contains editable user dictionaries.
ItemGets a Dictionary from the collection. This property is the indexer for the DictionaryCollection class.
LoadDictionaryDelayedGets or sets a value indicating whether a dictionary is loaded on adding to the TXSpell.Dictionaries dictionary collection partially or not. If the property is set to true, it is possible to spell check the text while the dictionary is still loading. In this case the spell checking text is slower than checking with completely loaded dictionaries. To get the full speed spell check performance the property needs to be set to false. The default value is false.

Methods

MethodDescription
AddAdds objects of the type Dictionary to the collection and validates them for spell checking and suggestion operations.
GetItemGets a particular dictionary from the collection by using the specified name.
MoveNextNot described in the reference. public bool MoveNext();
RemoveRemoves objects of the type Dictionary from the collection and invalidate them for spell checking and suggestion operations.
RemoveAtNot described in the reference. public void RemoveAt(int index);
ResetNot described in the reference. public void Reset();