wpf-devexpress-dot-xpf-dot-spellchecker-fca2d722.md
Allows you to implement the spell checking functionality for the text controls in XAML.
Namespace : DevExpress.Xpf.SpellChecker
Assembly : DevExpress.Xpf.SpellChecker.v25.2.dll
NuGet Package : DevExpress.Wpf.SpellChecker
[TargetType(typeof(TextEdit))]
[TargetType(typeof(TextBox))]
[TargetType(typeof(RichTextBox))]
[TargetType(typeof(MemoEdit))]
public class DXSpellChecker :
DXSpellCheckerBase<FrameworkElement>
<TargetType(GetType(TextEdit))>
<TargetType(GetType(TextBox))>
<TargetType(GetType(RichTextBox))>
<TargetType(GetType(MemoEdit))>
Public Class DXSpellChecker
Inherits DXSpellCheckerBase(Of FrameworkElement)
Use the DXSpellChecker instance to add the spell checker behavior to the following text controls:
Refer to the following article for information on how to enable spell checker behavior in these controls: Configure Spell-Checking Behavior
<!--Add the following namespace declarations:
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxspch="http://schemas.devexpress.com/winfx/2008/xaml/spellchecker"-->
<dxe:TextEdit Text="An ideal dictionarie shouldbe comprised of all the the words in a given langauge">
<dxmvvm:Interaction.Behaviors>
<dxspch:DXSpellChecker x:Name="spChecker"
UnderlineColor="#FFAA3A37"
IgnoreEmails="False"
Culture="en-US"
ShowSpellCheckMenu="True"
CheckAsYouType="True"
SpellingFormType="Word">
<dxspch:DXSpellChecker.Dictionaries>
<dxspch:SpellCheckerISpellDictionary AlphabetUri="Dictionaries/EnglishAlphabet.txt"
Culture="en-US"
DictionaryUri="pack://siteoforigin:,,,/Dictionaries/american.xlg"
GrammarUri="pack://siteoforigin:,,,/Dictionaries/english.aff"/>
</dxspch:DXSpellChecker.Dictionaries>
</dxspch:DXSpellChecker>
</dxmvvm:Interaction.Behaviors>
</dxe:TextEdit>
Text editors that support the DXSpellChecker behavior do not have the property to obtain the spell checker. If your scenario requires tracking the checking process or managing user interaction, use the standalone SpellChecker object or the MVVM approach. Refer to the following topic for more information: How to: Use WPF Spell Checker in MVVM Applications
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DXSpellChecker class.
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.
how-to-add-spell-check-menu-items-to-the-standard-text-controls/CS/WpfApp1/MainWindow.xaml#L26
<dxmvvm:Interaction.Behaviors>
<dxspch:DXSpellChecker Culture="en-US" CheckAsYouType="True" />
</dxmvvm:Interaction.Behaviors>
Show 11 items
Object DispatcherObject DependencyObject Freezable Animatable DevExpress.Mvvm.UI.Interactivity.AttachableObjectBase DevExpress.Mvvm.UI.Interactivity.Behavior DevExpress.Mvvm.UI.Interactivity.Behavior<FrameworkElement> SpellCheckerBase<FrameworkElement> DevExpress.Xpf.SpellChecker.DXSpellCheckerBase<FrameworkElement> DXSpellChecker
GetErrorOperationCommands(Position)
GetErrorOperationCommands(Int32)
GetErrorOperationCommands(Point)
See Also