ISpellChecker
Provides culture-aware word validation, dictionary access, custom-word management, and spelling suggestions.
Definition
Namespace:Telerik.WinForms.Documents.Proofing
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public interface ISpellChecker
Properties
Gets or sets options that control which words document proofing checks, including uppercase words and words containing numbers.
SpellCheckerSettings Settings { get; set; }
Gets or sets the culture used by operations that do not accept a culture argument.
CultureInfo SpellCheckingCulture { get; set; }
The active culture, or null to use CurrentCulture.
Methods
Adds a spelling to the custom dictionary resolved for the specified culture, falling back to the invariant-culture dictionary.
void AddWord(string word, CultureInfo culture)
The spelling to add.
cultureCultureInfoThe culture whose custom dictionary receives the spelling.
Exceptions: InvalidOperationExceptionNo custom dictionary is registered for culture or the invariant culture.
Adds a spelling to the custom dictionary resolved for the active culture, falling back to the invariant-culture dictionary.
void AddWord(string word)
The spelling to add.
Exceptions: InvalidOperationExceptionNo custom dictionary is registered for the active culture or the invariant culture.
Determines whether a custom dictionary resolves for the specified culture, including the invariant-culture fallback.
bool CanAddWord(CultureInfo culture)
The culture whose custom dictionary is checked.
Returns:true when a custom dictionary is available; otherwise, false.
Determines whether a word is recognized using the specified culture and its available dictionaries.
bool CheckWordIsCorrect(string word, CultureInfo culture)
The spelling to check.
cultureCultureInfoThe culture whose dictionaries are used.
Returns:Gets the custom dictionary for the active culture, falling back to the invariant-culture custom dictionary.
ICustomWordDictionary GetCustomDictionary()
The matching custom dictionary, or null when none is available.
Gets the custom dictionary for the specified culture, falling back to the invariant-culture custom dictionary.
ICustomWordDictionary GetCustomDictionary(CultureInfo culture)
The culture whose custom dictionary is requested.
Returns:The matching custom dictionary, or null when none is available.
Gets the word dictionary for the active culture, falling back to the invariant-culture dictionary.
IWordDictionary GetDictionary()
The matching dictionary, or null when neither dictionary is available.
Gets the word dictionary for the specified culture, falling back to the invariant-culture dictionary.
IWordDictionary GetDictionary(CultureInfo culture)
The culture whose dictionary is requested.
Returns:The matching dictionary, or null when neither dictionary is available.
Gets ranked spelling candidates using the specified culture.
ICollection<string> GetSuggestions(string word, CultureInfo culture)
The spelling for which to find candidates.
cultureCultureInfoThe culture whose dictionaries are used.
Returns:ICollection<string>
Candidate replacement spellings; the collection can be empty when no candidates are found.
Removes a spelling from the custom dictionary resolved for the specified culture, falling back to the invariant-culture dictionary.
void RemoveWord(string word, CultureInfo culture)
The spelling to remove.
cultureCultureInfoThe culture whose custom dictionary is searched.
Exceptions: InvalidOperationExceptionNo custom dictionary is registered for culture or the invariant culture.
Removes a spelling from the custom dictionary resolved for the active culture, falling back to the invariant-culture dictionary.
void RemoveWord(string word)
The spelling to remove.
Exceptions: InvalidOperationExceptionNo custom dictionary is registered for the active culture or the invariant culture.
Events
Occurs when dictionary data or the active culture changes.
event EventHandler DataChanged