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

Checks spelling in text controls and provides as-you-type markers and context-menu word actions.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.SpellChecker.dll

Syntax:

C#
[Export(typeof(IControlSpellChecker))]
public class TextBoxSpellChecker : ControlSpellCheckerBase, IControlSpellChecker, IDisposable

Inheritance: objectControlSpellCheckerBaseTextBoxSpellChecker

Implements: IControlSpellCheckerIDisposable

Inherited Members ControlSpellCheckerBase.ResetFields()ControlSpellCheckerBase.IgnoredOnceWordsControlSpellCheckerBase.IgnoredWordsControlSpellCheckerBase.SpellCheckerControlSpellCheckerBase.ShowAllCapitalLettersWord

Constructors

Creates a checker that can be associated with a supported text control.

C#
public TextBoxSpellChecker()

Creates a checker for a Telerik text-box control element.

C#
public TextBoxSpellChecker(RadTextBoxControlElement radTextBoxControlElement)
Parameters:radTextBoxControlElementRadTextBoxControlElement

The text-box element to check.

Creates a checker for a Windows Forms text box. Initialization is skipped in a terminal server session.

C#
public TextBoxSpellChecker(TextBoxBase textBoxBase)
Parameters:textBoxBaseTextBoxBase

The text box to check.

Properties

Gets or sets the text control currently associated with this checker.

C#
public override Control CurrentControl { get; set; }

Overrides: ControlSpellCheckerBase.CurrentControl

Gets or sets the menu used to display spelling suggestions and word actions.

C#
public RadDropDownMenu DropDownMenu { get; set; }

Methods

Replaces the current text selection with a suggestion. For a RichTextBox, the replacement path copies the selection's font family, size, style, and background color.

C#
public override void ChangeCurrentWord(string suggestion)
Parameters:suggestionstring

The replacement spelling.

Overrides: ControlSpellCheckerBase.ChangeCurrentWord(string)

Clears tracked spelling errors, removes paint and context-menu hooks, and disposes the base spell-checking state.

C#
public override void Dispose()

Overrides: ControlSpellCheckerBase.Dispose()

Enumerates candidate words from the associated text, excluding words the parser identifies as containing digits and, by default, words containing no lowercase characters.

C#
public IEnumerable<IWordInfo> GetListOfWords()
Returns:

IEnumerable<IWordInfo>

Words longer than one character with their starting positions in the text.

Determines whether a string contains no lowercase characters.

C#
public static bool IsUpper(string value)
Parameters:valuestring

The string to examine.

Returns:

bool

true when value contains no lowercase characters; otherwise, false.

Selects the first unignored misspelling in the text and returns its spelling and position.

C#
public override IWordInfo MoveToNextError()
Returns:

IWordInfo

The selected misspelled word, or null when no unignored misspellings remain.

Overrides: ControlSpellCheckerBase.MoveToNextError()

Replaces the associated text control's contents with the supplied document text.

C#
public override void SetContentFromDocument(string document)
Parameters:documentstring

The text to display.

Overrides: ControlSpellCheckerBase.SetContentFromDocument(string)