Class
RadSpellChecker

Represents a component that provides spell checking functionality for various text-based controls in Windows Forms applications.

Definition

Constructors

RadSpellChecker()

Declaration

cs-api-definition
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

cs-api-definition
public virtual object AutoSpellCheckControl { get; set; }

Property Value

object

EnableCompleteMessageBox

Gets or sets a value that determines whether the "Spell check complete" message box is displayed when spell checking is finished.

Declaration

cs-api-definition
public bool EnableCompleteMessageBox { get; set; }

Property Value

bool

FormSettings

Gets the form settings that control the appearance and behavior of the spell checking dialog.

Declaration

cs-api-definition
[Browsable(false)]
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

cs-api-definition
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

cs-api-definition
public FormStartPosition SpellingFormStartPosition { get; set; }

Property Value

FormStartPosition

ThemeName

Gets or sets control's preferred theme name. Themes are stored and retrieved using APIs of ThemeResolutionService.

Declaration

cs-api-definition
[Browsable(true)]
public string ThemeName { get; set; }

Property Value

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

cs-api-definition
public void Check(Control editControl)

Parameters

editControl

Control

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

cs-api-definition
protected virtual void CheckAllAtOnce(IControlSpellChecker spellChecker)

Parameters

spellChecker

IControlSpellChecker

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

cs-api-definition
protected virtual void CheckWordByWord(IControlSpellChecker spellChecker)

Parameters

spellChecker

IControlSpellChecker

The control spell checker to use for checking spelling.

Dispose(bool)

Releases the unmanaged resources used by the RadSpellChecker and optionally releases the managed resources.

Declaration

cs-api-definition
protected override void Dispose(bool disposing)

Parameters

disposing

bool

True to release both managed and unmanaged resources; false to release only unmanaged resources.

Overrides Component.Dispose(bool)

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

cs-api-definition
public IControlSpellChecker GetControlSpellChecker(Type editControlType)

Parameters

editControlType

Type

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

cs-api-definition
protected virtual void OnSpellingFormShowing(SpellingFormShowingEventArgs e)

Parameters

e

SpellingFormShowingEventArgs

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

cs-api-definition
public void RegisterControlSpellChecker(Type controlType, IControlSpellChecker spellChecker)

Parameters

controlType

Type

The type of control to be associated with the spell checker.

spellChecker

IControlSpellChecker

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

cs-api-definition
protected virtual bool SetAutoSpellChecker(object value)

Parameters

value

object

The control object to enable auto spell checking for.

Returns

bool

True if the specified control is supported for auto spell checking; otherwise, false.

ShouldSerializeAutoSpellCheckControl(object)

Determines whether the AutoSpellCheckControl property should be serialized.

Declaration

cs-api-definition
public bool ShouldSerializeAutoSpellCheckControl(object value)

Parameters

value

object

The value to check for serialization.

Returns

bool

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

cs-api-definition
public event SpellingFormShowingEventHandler SpellingFormShowing

Event Value

SpellingFormShowingEventHandler