Back to Devexpress

DictionaryBase.DictionaryPath Property

blazor-devexpress-dot-blazor-dot-richedit-dot-spellcheck-dot-dictionarybase-bc86f73d.md

latest2.6 KB
Original Source

DictionaryBase.DictionaryPath Property

Specifies a path to a dictionary file.

Namespace : DevExpress.Blazor.RichEdit.SpellCheck

Assembly : DevExpress.Blazor.RichEdit.v25.2.dll

NuGet Package : DevExpress.Blazor.RichEdit

Declaration

csharp
public string DictionaryPath { get; set; }

Property Value

TypeDescription
String

A file path.

|

Remarks

The DictionaryBase class is the basis for the Dictionary, ISpellDictionary, and HunspellDictionary classes. Depending on the class, this property contains a path to one of the following files:

Simple dictionaryThe DictionaryPath property of the Dictionary class specifies a path to a text document that lists all the words of a particular language.Base words fileThe DictionaryPath property of the HunspellDictionary and ISpellDictionary classes specifies a path to a file that lists root words with applicable flags. A flag defines which affixes (prefixes and suffixes) can be added to a root.

The following code snippet adds an ISpell dictionary:

csharp
public void ConfigureServices(IServiceCollection services) {
    services.AddDevExpressBlazor().AddSpellCheck(opts => {
        opts.FileProvider = new PhysicalFileProvider(
            Path.Combine(Directory.GetCurrentDirectory(), "Data", "Dictionaries")
        );
        opts.Dictionaries.Add(new ISpellDictionary {
            DictionaryPath = "american.xlg",
            GrammarPath = "english.aff",
            Culture = "en-US"
        });
    });
}

Refer to the following topic for additional information: Spell Check.

See Also

DictionaryBase Class

DictionaryBase Members

DevExpress.Blazor.RichEdit.SpellCheck Namespace