skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class DocumentSpellChecker

Represents a spell checker for documents that utilizes Telerik's proofing framework. This class provides functionality to check the spelling of words within a document and suggests corrections for any misspelled words.

Inheritance
System.Object
DocumentSpellChecker
Namespace: Telerik.Windows.Documents.Proofing
Assembly: Telerik.Windows.Controls.RichTextBox.dll

Syntax

public class DocumentSpellChecker : Object, ISpellChecker

Constructors

DocumentSpellChecker()

Declaration
public DocumentSpellChecker()

DocumentSpellChecker(ICustomWordDictionary)

Declaration
public DocumentSpellChecker(ICustomWordDictionary customDictionary)
Parameters
ICustomWordDictionary customDictionary

Fields

EditDistanceCoefficient

Declaration
public static readonly int EditDistanceCoefficient
Field Value
System.Int32

EditDistanceLimit

Declaration
public static readonly int EditDistanceLimit
Field Value
System.Int32

EditDistanceOneBoost

Declaration
public static readonly int EditDistanceOneBoost
Field Value
System.Int32

EditDistanceScanLimit

Declaration
public static readonly int EditDistanceScanLimit
Field Value
System.Int32

EndsDifferencePenalty

Declaration
public static readonly int EndsDifferencePenalty
Field Value
System.Int32

MaxNumberOfSuggestions

Declaration
public static readonly int MaxNumberOfSuggestions
Field Value
System.Int32

MetaphoneEqualBoost

Declaration
public static readonly int MetaphoneEqualBoost
Field Value
System.Int32

Properties

AutomaticallyLoadDefaultDictionaries

Gets or sets a value indicating whether MEF should be used to load default dictionaries.

Declaration
public bool AutomaticallyLoadDefaultDictionaries { get; set; }
Property Value
System.Boolean

true if default dictionaries should be loaded automatically; otherwise, false.

DictionaryList

Gets or sets the list of dictionaries used by SpellChecker. Generally this property is not intended to be used directly from your code, rather it is set automatically by MEF.

Declaration
public List<Tuple<IWordDictionary, string>> DictionaryList { get; set; }
Property Value
System.Collections.Generic.List<System.Tuple<IWordDictionary, System.String>>

Settings

Represents the settings for the DocumentSpellChecker in the Telerik.Windows.Documents.Proofing namespace.

Declaration
public SpellCheckerSettings Settings { get; set; }
Property Value
SpellCheckerSettings

Implements
ISpellChecker.Settings

SpellCheckingCulture

Gets or sets the culture used for spell checking in the document.

Declaration
public CultureInfo SpellCheckingCulture { get; set; }
Property Value
System.Globalization.CultureInfo

The culture information that determines the language for spell checking.

Implements
ISpellChecker.SpellCheckingCulture

Methods

AddCustomDictionary(ICustomWordDictionary, CultureInfo)

Adds a custom dictionary with the specified culture to the spell checker. If a dictionary with this culture already exists, it is overwritten.

Declaration
public void AddCustomDictionary(ICustomWordDictionary customDictionary, CultureInfo culture)
Parameters
ICustomWordDictionary customDictionary

System.Globalization.CultureInfo culture

AddDictionary(IWordDictionary, CultureInfo)

Adds a lazily initialized dictionary with the specified culture to the spell checker. If a dictionary with this culture already exists, it is overwritten.

Declaration
public void AddDictionary(IWordDictionary dictionary, CultureInfo culture)
Parameters
IWordDictionary dictionary

System.Globalization.CultureInfo culture

AddWord(String)

Adds a specified word to the dictionary of the spell checker.

Declaration
public void AddWord(string word)
Parameters
System.String word

The word to be added to the spell checker dictionary.

Implements
ISpellChecker.AddWord(String)

AddWord(String, CultureInfo)

Adds a custom word to the spell checker's dictionary for the specified culture.

Declaration
public void AddWord(string word, CultureInfo culture)
Parameters
System.String word

The word to be added to the dictionary.

System.Globalization.CultureInfo culture

The culture information for which the word should be recognized.

Implements
ISpellChecker.AddWord(String, CultureInfo)

CanAddWord()

Determines whether a word can be added to the spell checker dictionary.

Declaration
public bool CanAddWord()
Returns
System.Boolean

A boolean value indicating if the word can be added. Returns true if the word can be added; otherwise, false.

Implements
ISpellChecker.CanAddWord()

CanAddWord(CultureInfo)

Determines whether a word can be added to the spell checker dictionary for the specified culture.

Declaration
public bool CanAddWord(CultureInfo culture)
Parameters
System.Globalization.CultureInfo culture

The culture information that specifies the language for the spell checker.

Returns
System.Boolean

true if the word can be added; otherwise, false.

Implements
ISpellChecker.CanAddWord(CultureInfo)

CheckWordIsCorrect(String)

Checks if the specified word is spelled correctly.

Declaration
public bool CheckWordIsCorrect(string word)
Parameters
System.String word

The word to be checked for spelling accuracy.

Returns
System.Boolean

A boolean value indicating whether the word is spelled correctly. True if the word is correct; otherwise, false.

Implements
ISpellChecker.CheckWordIsCorrect(String)

CheckWordIsCorrect(String, CultureInfo)

Checks if the specified word is spelled correctly according to the current dictionary.

Declaration
public bool CheckWordIsCorrect(string word, CultureInfo culture)
Parameters
System.String word

The word to be checked for spelling accuracy.

System.Globalization.CultureInfo culture

The culture information that specifies the language of the dictionary used for checking.

Returns
System.Boolean

True if the word is spelled correctly; otherwise, false.

Implements
ISpellChecker.CheckWordIsCorrect(String, CultureInfo)

GetCustomDictionary()

Retrieves the custom dictionary used by the document spell checker.

Declaration
public ICustomWordDictionary GetCustomDictionary()
Returns
ICustomWordDictionary

A object representing the custom dictionary.

Implements
ISpellChecker.GetCustomDictionary()

GetCustomDictionary(CultureInfo)

Retrieves a custom dictionary associated with the specified culture information.

Declaration
public ICustomWordDictionary GetCustomDictionary(CultureInfo culture)
Parameters
System.Globalization.CultureInfo culture

Returns
ICustomWordDictionary

A custom dictionary object corresponding to the specified culture, or null if no custom dictionary exists.

Implements
ISpellChecker.GetCustomDictionary(CultureInfo)

GetDictionary()

Retrieves the spell-checking dictionary used by the DocumentSpellChecker.

Declaration
public IWordDictionary GetDictionary()
Returns
IWordDictionary

The spell-checking dictionary as an object of type T.

Implements
ISpellChecker.GetDictionary()

GetDictionary(CultureInfo)

Retrieves the spell-checking dictionary for the specified culture.

Declaration
public IWordDictionary GetDictionary(CultureInfo culture)
Parameters
System.Globalization.CultureInfo culture

The culture information for which the dictionary is to be retrieved.

Returns
IWordDictionary

A dictionary object containing the spell-checking entries for the specified culture.

Implements
ISpellChecker.GetDictionary(CultureInfo)

GetSuggestions(String)

Retrieves a list of spelling suggestions for the specified word.

Declaration
public ICollection<string> GetSuggestions(string word)
Parameters
System.String word

The word for which to generate spelling suggestions.

Returns
System.Collections.Generic.ICollection<System.String>

A collection of suggested corrections for the specified word.

Implements
ISpellChecker.GetSuggestions(String)

GetSuggestions(String, CultureInfo)

Retrieves a list of spelling suggestions for the specified word based on the provided culture information.

Declaration
public ICollection<string> GetSuggestions(string word, CultureInfo culture)
Parameters
System.String word

The word for which to retrieve spelling suggestions.

System.Globalization.CultureInfo culture

The culture information that influences the spelling suggestions.

Returns
System.Collections.Generic.ICollection<System.String>

A collection of suggestions for the specified word.

Implements
ISpellChecker.GetSuggestions(String, CultureInfo)

RemoveCustomDictionary(CultureInfo)

Removes the custom dictionary with the specified culture from the spell checker. This method returns false if no such dictionary is found.

Declaration
public bool RemoveCustomDictionary(CultureInfo culture)
Parameters
System.Globalization.CultureInfo culture

Returns
System.Boolean

RemoveDictionary(CultureInfo)

Removes the dictionary with the specified culture from the spell checker. This method returns false if no such dictionary is found.

Declaration
public bool RemoveDictionary(CultureInfo culture)
Parameters
System.Globalization.CultureInfo culture

Returns
System.Boolean

RemoveWord(String)

Removes a specified word from the spell checker dictionary.

Declaration
public void RemoveWord(string word)
Parameters
System.String word

The word to be removed from the dictionary.

Implements
ISpellChecker.RemoveWord(String)

RemoveWord(String, CultureInfo)

Removes a specified word from the spell check dictionary for the current culture.

Declaration
public void RemoveWord(string word, CultureInfo culture)
Parameters
System.String word

The word to be removed from the dictionary.

System.Globalization.CultureInfo culture

The culture information that specifies the language of the word.

Implements
ISpellChecker.RemoveWord(String, CultureInfo)

Events

DataChanged

Declaration
public event EventHandler DataChanged
Event Type
System.EventHandler

Implements
ISpellChecker.DataChanged

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.