ClassDocumentSpellChecker
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:
public class DocumentSpellChecker : ISpellChecker
Inheritance: objectDocumentSpellChecker
Implements:
Constructors
DocumentSpellChecker()
Declaration
public DocumentSpellChecker()
DocumentSpellChecker(ICustomWordDictionary)
Declaration
public DocumentSpellChecker(ICustomWordDictionary customDictionary)
Parameters
customDictionary
Fields
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
true if default dictionaries should be loaded automatically; otherwise, false.
Settings
Represents the settings for the DocumentSpellChecker in the Telerik.Windows.Documents.Proofing namespace.
Declaration
public SpellCheckerSettings Settings { get; set; }
Property Value
Implements
SpellCheckingCulture
Gets or sets the culture used for spell checking in the document.
Declaration
public CultureInfo SpellCheckingCulture { get; set; }
Property Value
The culture information that determines the language for spell checking.
Implements
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
customDictionary
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
dictionary
culture
AddWord(string)
Adds a specified word to the dictionary of the spell checker.
Declaration
public void AddWord(string word)
Parameters
word
The word to be added to the spell checker dictionary.
Implements
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
word
The word to be added to the dictionary.
culture
The culture information for which the word should be recognized.
Implements
CanAddWord()
Determines whether a word can be added to the spell checker dictionary.
Declaration
public bool CanAddWord()
Returns
A boolean value indicating if the word can be added. Returns true if the word can be added; otherwise, false.
Implements
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
culture
The culture information that specifies the language for the spell checker.
Returns
true if the word can be added; otherwise, false.
Implements
CheckWordIsCorrect(string)
Checks if the specified word is spelled correctly.
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
word
The word to be checked for spelling accuracy.
culture
The culture information that specifies the language of the dictionary used for checking.
Returns
True if the word is spelled correctly; otherwise, false.
Implements
GetCustomDictionary()
Retrieves the custom dictionary used by the document spell checker.
Declaration
public ICustomWordDictionary GetCustomDictionary()
Returns
A CustomDictionary object representing the custom dictionary.
Implements
GetCustomDictionary(CultureInfo)
Retrieves a custom dictionary associated with the specified culture information.
Declaration
public ICustomWordDictionary GetCustomDictionary(CultureInfo culture)
Parameters
culture
Returns
A custom dictionary object corresponding to the specified culture, or null if no custom dictionary exists.
Implements
GetDictionary()
Retrieves the spell-checking dictionary used by the DocumentSpellChecker.
Declaration
public IWordDictionary GetDictionary()
Returns
The spell-checking dictionary as an object of type T.
Implements
GetDictionary(CultureInfo)
Retrieves the spell-checking dictionary for the specified culture.
Declaration
public IWordDictionary GetDictionary(CultureInfo culture)
Parameters
culture
The culture information for which the dictionary is to be retrieved.
Returns
A dictionary object containing the spell-checking entries for the specified culture.
Implements
GetSuggestions(string)
Retrieves a list of spelling suggestions for the specified word.
Declaration
public ICollection<string> GetSuggestions(string word)
Parameters
word
The word for which to generate spelling suggestions.
Returns
A collection of suggested corrections for the specified word.
Implements
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
word
The word for which to retrieve spelling suggestions.
culture
The culture information that influences the spelling suggestions.
Returns
A collection of suggestions for the specified word.
Implements
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
culture
Returns
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
culture
Returns
RemoveWord(string)
Removes a specified word from the spell checker dictionary.
Declaration
public void RemoveWord(string word)
Parameters
word
The word to be removed from the dictionary.
Implements
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
word
The word to be removed from the dictionary.
culture
The culture information that specifies the language of the word.
Implements
Events
DataChanged
Declaration
public event EventHandler DataChanged
Event Value
Implements