TX Spell .NET for Windows Forms

Add Method

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

Description

Adds objects of the type Dictionary to the collection and validates them for spell checking and suggestion operations.

Syntax

public int Add(Dictionary dictionary);

Parameters

ParameterDescription
dictionary

Specifies the dictionary.

Return Value

The collection index at which the dictionary has been added.

Examples

The following example adds an item to the dictionary collection.

var result = dictionaryCollection.Add(new TXTextControl.Proofing.UserDictionary());
Console.WriteLine($"Add result: {result}");

Remarks

This method throws an exception when called while the SpellCheckDialog is open (except for adding dictionaries of type UserDictionary when the built-in options dialog was invoked by a SpellCheckDialog's dialog button).