$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
RichTextBox Control for Windows Forms
Edit rich text content with text formatting options, mail-merge, table, and floating objects, etc.
Home > WinForms UI Controls > User Manual > Spell Check in RichTextBox in C#

RichTextBox Control Spell Checking in C#.NET

KetticRichTextBox WinForms control is capable of performing the spell check functionality while the users are typing new words into the content of this control. When their new input contains misspell, the newly typed words will be underlined with a red wavy line. The spell checking functionality is enabled through the EnableSpellCheck property on the KetticRichTextBox .NET component. Moreover, this control allows the users to specify an appropriate dictionary to perform the spell check.

Enable and Customize Spell Check on KetticRichTextBox

KetticRichTextBox control contains the EnableSpellCheck property for enabling or disabling the spell check functionality. When setting the value of this property to True, the KetticRichTextBox component will load the dictionary specified for spell checking.
Furthermore, the KetticRichTextBox provide a property, SpellChecher, which allows the users to customize the spell checker. The default setting applies the object of DocumentSpellChecker, which implements the ISpellChecker interface, to the SpellChecker property. The users can also provide custom C# class to implement the ISpellChecker interface.

C# Load Dictionary to KetticRichTextBox

KetticRichTextBox provides the IWordDic interface that the dictionaries implements in C# Windows Forms applications. The WordDic C# class allows the users to easily and interactively operate with the dictionaries from KetticSpell for C#.NET. And it also supports the loading of a dictionary from .tdf files. The following C# code sample demonstrates how to load a dictionary from a .tdf file using the WordDic C# class.

private void LoadDictionary(Stream tdfFileStream)
WordDic dictionary = new WordDic();
((DocumentSpellChecker)this.ketticRichTextBox1.SpellChecker).AddDictionary(dictionary, CultureInfo.InvariantCulture);

Add Words to a Dictionary in KetticRichTextBox

KetticRichTextBox contains a AddWord() method for adding a word to a dictionary. If we want to add words to different dictionaries in a single culture, we can use the AddWord() method of the DocumentSpellChecker, otherwise, we should use this method of the specific dictionary to add words respectively. The simple C# code snippet below shows how to add words to a dictionary.

this.ketticRichTextBox1.SpellChecker.AddWord("Kettic", CultureInfo.InvariantCulture);

Global Cultures Capability of KetticRichTextBox

KetticRichTextBox provides the spell checking capability of various cultures appear in the same application. This feature is achieved by combining all dictionaries and custom dictionary to a specific culture. The C# code below demonstrates how to load international dictionary in C#.NET projects.

private void LoadDictionaryDE(Stream tdfFileStream)
WordDic dictionary = new WordDic();
dictionary.Load( tdfFileStream );
(( DocumentSpellChecker )this.ketticRichTextBox1.SpellChecker ).AddDictionary( dictionary, new CultureInfo( "fr-FR" ));
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls