Back to Devexpress

SpellingSettings.RegisterTextControl(Type) Method

wpf-devexpress-dot-xpf-dot-spellchecker-dot-spellingsettings-dot-registertextcontrol-x28-system-dot-type-x29.md

latest3.0 KB
Original Source

SpellingSettings.RegisterTextControl(Type) Method

Enables spell checking for the descendants of the standard controls (TextBox, RichTextBox) and TextEdit.

Namespace : DevExpress.Xpf.SpellChecker

Assembly : DevExpress.Xpf.SpellChecker.v25.2.dll

NuGet Package : DevExpress.Wpf.SpellChecker

Declaration

csharp
public static void RegisterTextControl(
    Type controlType
)
vb
Public Shared Sub RegisterTextControl(
    controlType As Type
)

Parameters

NameTypeDescription
controlTypeType

The type of the control being registered.

|

Remarks

Call the RegisterTextControl method to enable spell checking for custom control types which inherit standard controls (TextBox, RichTextBox) and TextEdit.

Note

If the type of the control passed to the RegisterTextControl method cannot be registered, an exception occurs.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RegisterTextControl(Type) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-spreadsheet-spell-check-cell-text/CS/SpreadsheetSpellChecker.cs#L12

csharp
base.OnAttached();
SpellingSettings.RegisterTextControl(typeof(XpfCellInplaceEditor));
SubscribeToEvents();

wpf-spreadsheet-spell-check-cell-text/VB/SpreadsheetSpellChecker.vb#L20

vb
MyBase.OnAttached()
SpellingSettings.RegisterTextControl(GetType(XpfCellInplaceEditor))
SubscribeToEvents()

See Also

SpellingSettings Class

SpellingSettings Members

DevExpress.Xpf.SpellChecker Namespace