New to Telerik UI for WinForms? Start a free 30-day trial

ISpellChecker

Interface

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:

C#
public interface ISpellChecker

Properties

Gets or sets options that control which words document proofing checks, including uppercase words and words containing numbers.

C#
SpellCheckerSettings Settings { get; set; }

Gets or sets the culture used by operations that do not accept a culture argument.

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

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.

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

The spelling to add.

cultureCultureInfo

The culture whose custom dictionary receives the spelling.

Exceptions: InvalidOperationException

No 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.

C#
void AddWord(string word)
Parameters:wordstring

The spelling to add.

Exceptions: InvalidOperationException

No custom dictionary is registered for the active culture or the invariant culture.

Determines whether a custom dictionary resolves for the active culture, including the invariant-culture fallback.

C#
bool CanAddWord()
Returns:

bool

true when a custom dictionary is available; otherwise, false.

Determines whether a custom dictionary resolves for the specified culture, including the invariant-culture fallback.

C#
bool CanAddWord(CultureInfo culture)
Parameters:cultureCultureInfo

The culture whose custom dictionary is checked.

Returns:

bool

true when a custom dictionary is available; otherwise, false.

Determines whether a word is recognized using the specified culture and its available dictionaries.

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

The spelling to check.

cultureCultureInfo

The culture whose dictionaries are used.

Returns:

bool

true when the spelling is recognized; otherwise, false.

Determines whether a word is recognized using the active culture and its available dictionaries.

C#
bool CheckWordIsCorrect(string word)
Parameters:wordstring

The spelling to check.

Returns:

bool

true when the spelling is recognized; otherwise, false.

Gets the custom dictionary for the active culture, falling back to the invariant-culture custom dictionary.

C#
ICustomWordDictionary GetCustomDictionary()
Returns:

ICustomWordDictionary

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.

C#
ICustomWordDictionary GetCustomDictionary(CultureInfo culture)
Parameters:cultureCultureInfo

The culture whose custom dictionary is requested.

Returns:

ICustomWordDictionary

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.

C#
IWordDictionary GetDictionary()
Returns:

IWordDictionary

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.

C#
IWordDictionary GetDictionary(CultureInfo culture)
Parameters:cultureCultureInfo

The culture whose dictionary is requested.

Returns:

IWordDictionary

The matching dictionary, or null when neither dictionary is available.

Gets ranked spelling candidates using the specified culture.

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

The spelling for which to find candidates.

cultureCultureInfo

The culture whose dictionaries are used.

Returns:

ICollection<string>

Candidate replacement spellings; the collection can be empty when no candidates are found.

Gets ranked spelling candidates using the active culture.

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

The spelling for which to find candidates.

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.

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

The spelling to remove.

cultureCultureInfo

The culture whose custom dictionary is searched.

Exceptions: InvalidOperationException

No 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.

C#
void RemoveWord(string word)
Parameters:wordstring

The spelling to remove.

Exceptions: InvalidOperationException

No custom dictionary is registered for the active culture or the invariant culture.

Events

Occurs when dictionary data or the active culture changes.

C#
event EventHandler DataChanged