Class RadSpellChecker
Represents a component that provides spell checking functionality for various text-based controls in Windows Forms applications.
Inheritance
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.SpellChecker.dll
Syntax
[TelerikToolboxCategory("Editors")]
public class RadSpellChecker : Component, IDisposable
Constructors
RadSpellChecker()
Declaration
public RadSpellChecker()
Properties
AutoSpellCheckControl
Gets or sets the control that will be automatically spell checked as the user types. Supports TextBox, RichTextBox, RadTextBox, RadTextBoxControl, and RadAutoCompleteBox controls.
Declaration
public virtual object AutoSpellCheckControl { get; set; }
Property Value
System.Object
|
EnableCompleteMessageBox
Gets or sets a value that determines whether the "Spell check complete" message box is displayed when spell checking is finished.
Declaration
public bool EnableCompleteMessageBox { get; set; }
Property Value
System.Boolean
|
FormSettings
Gets the form settings that control the appearance and behavior of the spell checking dialog.
Declaration
public FormSettings FormSettings { get; }
Property Value
FormSettings
|
SpellCheckMode
Gets or sets the spell checking mode that determines whether to check text word-by-word or all at once.
Declaration
public SpellCheckMode SpellCheckMode { get; set; }
Property Value
SpellCheckMode
|
SpellingFormStartPosition
Gets or sets the start position of the spelling dialog form when it is displayed.
Declaration
public FormStartPosition SpellingFormStartPosition { get; set; }
Property Value
System.Windows.Forms.FormStartPosition
|
ThemeName
Gets or sets control's preferred theme name. Themes are stored and retrieved using APIs of ThemeResolutionService.
Declaration
public string ThemeName { get; set; }
Property Value
System.String
|
Remarks
If ThemeResolutionService.ApplicatonThemeName refers to a non-empty string, the theme of a RadControl can differ from the one set using RadControls.ThemeName property. If the themes differ, the RadControls.ThemeName property will be overridden by ThemeResolutionService.ApplicatonThemeName. If no theme is registered with a name as ThemeResolutionService.ApplicatonThemeName, then control will revert to the theme specified by its ThemeName property. If ThemeName is assigned to a non-existing theme name, the control may have no visual properties assigned, which will cause it look and behave in unexpected manner. If ThemeName equals empty string, control's theme is set to a theme that is registered within ThemeResolutionService with the name "ControlDefault".
Methods
Check(Control)
Checks the specified edit control for spelling mistakes and displays appropriate dialogs based on the current SpellCheckMode.
Declaration
public void Check(Control editControl)
Parameters
System.Windows.Forms.Control
editControl
The control to check for spelling mistakes. |
CheckAllAtOnce(IControlSpellChecker)
Performs spell checking on the entire text content at once using a dialog that displays all misspelled words.
Declaration
protected virtual void CheckAllAtOnce(IControlSpellChecker spellChecker)
Parameters
IControlSpellChecker
spellChecker
The control spell checker to use for checking spelling. |
CheckWordByWord(IControlSpellChecker)
Performs spell checking one word at a time, displaying a dialog for each misspelled word found.
Declaration
protected virtual void CheckWordByWord(IControlSpellChecker spellChecker)
Parameters
IControlSpellChecker
spellChecker
The control spell checker to use for checking spelling. |
Dispose(Boolean)
Releases the unmanaged resources used by the RadSpellChecker and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean
disposing
True to release both managed and unmanaged resources; false to release only unmanaged resources. |
GetControlSpellChecker(Type)
Gets the appropriate spell checker for the specified control type. If no exact match is found, searches through the inheritance hierarchy to find a compatible spell checker.
Declaration
public IControlSpellChecker GetControlSpellChecker(Type editControlType)
Parameters
System.Type
editControlType
Type of the edit control to find a spell checker for. |
Returns
IControlSpellChecker
An IControlSpellChecker instance that can handle the specified control type, or null if no suitable spell checker is registered. |
OnSpellingFormShowing(SpellingFormShowingEventArgs)
Raises the SpellingFormShowing event.
Declaration
protected virtual void OnSpellingFormShowing(SpellingFormShowingEventArgs e)
Parameters
SpellingFormShowingEventArgs
e
The event arguments containing the spelling form information. |
RegisterControlSpellChecker(Type, IControlSpellChecker)
Registers an instance of IControlSpellChecker that is responsible for managing the spell checking of a specific type of control.
Declaration
public void RegisterControlSpellChecker(Type controlType, IControlSpellChecker spellChecker)
Parameters
System.Type
controlType
The type of control to be associated with the spell checker. |
IControlSpellChecker
spellChecker
The spell checker implementation that will handle the specified control type. |
SetAutoSpellChecker(Object)
Sets up the appropriate spell checker for the specified control to enable auto spell checking.
Declaration
protected virtual bool SetAutoSpellChecker(object value)
Parameters
System.Object
value
The control object to enable auto spell checking for. |
Returns
System.Boolean
True if the specified control is supported for auto spell checking; otherwise, false. |
ShouldSerializeAutoSpellCheckControl(Object)
Determines whether the AutoSpellCheckControl property should be serialized.
Declaration
public bool ShouldSerializeAutoSpellCheckControl(object value)
Parameters
System.Object
value
The value to check for serialization. |
Returns
System.Boolean
True if the value is not null and should be serialized; otherwise, false. |
Events
SpellingFormShowing
Occurs when a spelling form is about to be displayed, providing an opportunity to customize or cancel the form.
Declaration
public event SpellingFormShowingEventHandler SpellingFormShowing
Event Type
SpellingFormShowingEventHandler
|