Back to Devexpress

SpellCheckerCustomDictionary Class

corelibraries-devexpress-dot-xtraspellchecker-d896f984.md

latest3.6 KB
Original Source

SpellCheckerCustomDictionary Class

Represents a custom dictionary of the spell checker.

Namespace : DevExpress.XtraSpellChecker

Assembly : DevExpress.SpellChecker.v25.2.Core.dll

NuGet Package : DevExpress.SpellChecker.Core

Declaration

csharp
public class SpellCheckerCustomDictionary :
    SpellCheckerDictionary,
    ISerializable
vb
Public Class SpellCheckerCustomDictionary
    Inherits SpellCheckerDictionary
    Implements ISerializable

The following members return SpellCheckerCustomDictionary objects:

LibraryRelated API Members
Cross-Platform Class LibraryDictionaryHelper.GetCustomDictionary()
ASP.NET Web Forms ControlsASPxSpellChecker.GetCustomDictionary()
ASPxSpellCheckerCustomDictionary.Dictionary

Remarks

The custom dictionary can be created and updated by the user. The spelling form provides a command button for appending a word not found in dictionaries to the custom dictionary.

The custom dictionary can be saved to a file and loaded when necessary.

Example

The following code demonstrates how to create the SpellCheckerCustomDictionary dictionary at runtime.

Note

A complete sample project is available at https://github.com/DevExpress-Examples/winforms-spellchecker-enable-in-text-box

csharp
using DevExpress.XtraSpellChecker;
using System;
using System.Globalization;
            SpellCheckerCustomDictionary customDictionary = new SpellCheckerCustomDictionary();
            customDictionary.AlphabetPath = @"Dictionaries\EnglishAlphabet.txt";
            customDictionary.DictionaryPath = @"Dictionaries\CustomEnglish.dic";
            customDictionary.Culture = CultureInfo.InvariantCulture;
            spellChecker1.Dictionaries.Add(customDictionary);
vb
Imports DevExpress.XtraSpellChecker
Imports System
Imports System.Globalization
            Dim customDictionary As New SpellCheckerCustomDictionary()
            customDictionary.AlphabetPath = "Dictionaries\EnglishAlphabet.txt"
            customDictionary.DictionaryPath = "Dictionaries\CustomEnglish.dic"
            customDictionary.Culture = CultureInfo.InvariantCulture
            spellChecker1.Dictionaries.Add(customDictionary)

Implements

ISpellCheckerDictionary

Inheritance

Object DictionaryBase SpellCheckerDictionaryBase SpellCheckerDictionary SpellCheckerCustomDictionary

See Also

SpellCheckerCustomDictionary Members

DevExpress.XtraSpellChecker Namespace