wpf-devexpress-dot-xpf-dot-spellchecker-808b6cd3.md
Allows you to implement the spell checking functionality for the RichEditControl in XAML.
Namespace : DevExpress.Xpf.SpellChecker
Assembly : DevExpress.Xpf.SpellChecker.v25.2.dll
NuGet Package : DevExpress.Wpf.SpellChecker
[TargetType(typeof(StubClass))]
public class RichEditSpellChecker :
SpellCheckerBase<Control>,
ISpellChecker
<TargetType(GetType(StubClass))>
Public Class RichEditSpellChecker
Inherits SpellCheckerBase(Of Control)
Implements ISpellChecker
Use the RichEditSpellChecker instance to configure the spell checker behavior for the RichEditControl in XAML.
Refer to the following article for information on how to add spell checking behavior to DXRichEdit: Configure Spell-Checking Behavior
<Window
x:Class="RichEditSpellChecker_Example.MainWindow"
xmlns:dxre="http://schemas.devexpress.com/winfx/2008/xaml/richedit"
xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
xmlns:dxspch="http://schemas.devexpress.com/winfx/2008/xaml/spellchecker"
Height="350"
Width="525"
mc:Ignorable="d"
Title="MainWindow">
<Grid>
<dxre:RichEditControl DocumentSource="An ideal dictionarie shouldbe comprised of all the the words in a given langauge">
<dxre:RichEditControl.SpellCheckerOptions>
<dxre:DXRichEditSpellCheckerOptions AutoDetectDocumentCulture="True"/>
</dxre:RichEditControl.SpellCheckerOptions>
<dxmvvm:Interaction.Behaviors>
<dxspch:RichEditSpellChecker CheckAsYouType="True"
Culture="en-US"
IgnoreMixedCaseWords="False"
IgnoreUri="False"
SpellingFormType="Word">
<dxspch:RichEditSpellChecker.Dictionaries>
<dxspch:HunspellDictionary Culture="en-US"
DictionaryUri="pack://application:,,,/Dictionaries/en_US.dic"
GrammarUri="pack://application:,,,/Dictionaries/en_US.aff"/>
<dxspch:SpellCheckerCustomDictionary Culture="en-US"
DictionaryUri="Dictionaries/CustomEnglish.dic"
AlphabetUri="Dictionaries/EnglishAlphabet.txt"/>
</dxspch:RichEditSpellChecker.Dictionaries>
</dxspch:RichEditSpellChecker>
</dxmvvm:Interaction.Behaviors>
</dxre:RichEditControl>
</Grid>
</Window>
The RichEditControl.SpellChecker property obtains the RichEditSpellChecker instance. You can use this property to subscribe to the events in code-behind.
The spell checker object returned by the RichEditControl.SpellChecker property does not support user-interaction events (SpellingFormShowing, OptionsFormShowing and so on). Use the standalone spell checker to handle these events. Refer to the following articles for implementation details:
Object DispatcherObject DependencyObject Freezable Animatable DevExpress.Mvvm.UI.Interactivity.AttachableObjectBase DevExpress.Mvvm.UI.Interactivity.Behavior DevExpress.Mvvm.UI.Interactivity.Behavior<Control> SpellCheckerBase<Control> RichEditSpellChecker
GetErrorOperationCommands(Position)
GetErrorOperationCommands(Int32)
GetErrorOperationCommands(Point)
See Also