Skip to main content

RichEditSpellChecker Class

Allows you to implement the spell checking functionality for the RichEditControl in XAML.

Namespace: DevExpress.Xpf.SpellChecker

Assembly: DevExpress.Xpf.SpellChecker.v24.1.dll

NuGet Package: DevExpress.Wpf.SpellChecker

Declaration

[TargetType(typeof(StubClass))]
public class RichEditSpellChecker :
    SpellCheckerBase<Control>,
    ISpellChecker

Remarks

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

View Example

<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>

Handle RichEditSpellChecker Events

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:

Inheritance

Object
DispatcherObject
DependencyObject
Freezable
Animatable
DevExpress.Mvvm.UI.Interactivity.AttachableObjectBase
DevExpress.Mvvm.UI.Interactivity.Behavior
DevExpress.Mvvm.UI.Interactivity.Behavior<Control>
SpellCheckerBase<Control>
RichEditSpellChecker
See Also