New to Telerik UI for WPFStart a free 30-day trial

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.

Definition

Namespace:Telerik.Windows.Documents.Proofing

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

C#
public class DocumentSpellChecker : ISpellChecker

Inheritance: objectDocumentSpellChecker

Implements: ISpellChecker

Constructors

C#
public DocumentSpellChecker()
C#
public DocumentSpellChecker(ICustomWordDictionary customDictionary)
Parameters:customDictionaryICustomWordDictionary

Fields

C#
public static readonly int EditDistanceCoefficient
C#
public static readonly int EditDistanceLimit
C#
public static readonly int EditDistanceOneBoost
C#
public static readonly int EditDistanceScanLimit
C#
public static readonly int EndsDifferencePenalty
C#
public static readonly int MaxNumberOfSuggestions
C#
public static readonly int MetaphoneEqualBoost

Properties

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

C#
public bool AutomaticallyLoadDefaultDictionaries { get; set; }
Property Value:

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

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

C#
public SpellCheckerSettings Settings { get; set; }

Implements: ISpellChecker.Settings

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

C#
public CultureInfo SpellCheckingCulture { get; set; }
Property Value:

The culture information that determines the language for spell checking.

Implements: ISpellChecker.SpellCheckingCulture

Methods

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

C#
public void AddCustomDictionary(ICustomWordDictionary customDictionary, CultureInfo culture)
Parameters:customDictionaryICustomWordDictionarycultureCultureInfo

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

C#
public void AddDictionary(IWordDictionary dictionary, CultureInfo culture)
Parameters:dictionaryIWordDictionarycultureCultureInfo

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

C#
public void AddWord(string word, CultureInfo culture)
Parameters:wordstring

The word to be added to the dictionary.

cultureCultureInfo

The culture information for which the word should be recognized.

Implements: ISpellChecker.AddWord(string, CultureInfo)

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

C#
public void AddWord(string word)
Parameters:wordstring

The word to be added to the spell checker dictionary.

Implements: ISpellChecker.AddWord(string)

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

C#
public bool CanAddWord()
Returns:

bool

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

Implements: ISpellChecker.CanAddWord()

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

C#
public bool CanAddWord(CultureInfo culture)
Parameters:cultureCultureInfo

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

Returns:

bool

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

Implements: ISpellChecker.CanAddWord(CultureInfo)

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

C#
public bool CheckWordIsCorrect(string word, CultureInfo culture)
Parameters:wordstring

The word to be checked for spelling accuracy.

cultureCultureInfo

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

Returns:

bool

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

Implements: ISpellChecker.CheckWordIsCorrect(string, CultureInfo)

Checks if the specified word is spelled correctly.

C#
public bool CheckWordIsCorrect(string word)
Parameters:wordstring

The word to be checked for spelling accuracy.

Returns:

bool

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

Implements: ISpellChecker.CheckWordIsCorrect(string)

Retrieves the custom dictionary used by the document spell checker.

C#
public ICustomWordDictionary GetCustomDictionary()
Returns:

ICustomWordDictionary

A CustomDictionary object representing the custom dictionary.

Implements: ISpellChecker.GetCustomDictionary()

Retrieves a custom dictionary associated with the specified culture information.

C#
public ICustomWordDictionary GetCustomDictionary(CultureInfo culture)
Parameters:cultureCultureInfoReturns:

ICustomWordDictionary

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

Implements: ISpellChecker.GetCustomDictionary(CultureInfo)

Retrieves the spell-checking dictionary used by the DocumentSpellChecker.

C#
public IWordDictionary GetDictionary()
Returns:

IWordDictionary

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

Implements: ISpellChecker.GetDictionary()

Retrieves the spell-checking dictionary for the specified culture.

C#
public IWordDictionary GetDictionary(CultureInfo culture)
Parameters:cultureCultureInfo

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)

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

C#
public ICollection<string> GetSuggestions(string word, CultureInfo culture)
Parameters:wordstring

The word for which to retrieve spelling suggestions.

cultureCultureInfo

The culture information that influences the spelling suggestions.

Returns:

ICollection<string>

A collection of suggestions for the specified word.

Implements: ISpellChecker.GetSuggestions(string, CultureInfo)

Retrieves a list of spelling suggestions for the specified word.

C#
public ICollection<string> GetSuggestions(string word)
Parameters:wordstring

The word for which to generate spelling suggestions.

Returns:

ICollection<string>

A collection of suggested corrections for the specified word.

Implements: ISpellChecker.GetSuggestions(string)

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

C#
public bool RemoveCustomDictionary(CultureInfo culture)
Parameters:cultureCultureInfoReturns:

bool

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

C#
public bool RemoveDictionary(CultureInfo culture)
Parameters:cultureCultureInfoReturns:

bool

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

C#
public void RemoveWord(string word, CultureInfo culture)
Parameters:wordstring

The word to be removed from the dictionary.

cultureCultureInfo

The culture information that specifies the language of the word.

Implements: ISpellChecker.RemoveWord(string, CultureInfo)

Removes a specified word from the spell checker dictionary.

C#
public void RemoveWord(string word)
Parameters:wordstring

The word to be removed from the dictionary.

Implements: ISpellChecker.RemoveWord(string)

Events

C#
public event EventHandler DataChanged

Implements: ISpellChecker.DataChanged