[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Collapse]Spell Checker
   [Expand]Overview
   [Collapse]Getting Started
     Lesson 1 - Configure Spell Checking Behavior
     Lesson 2 - Manage the Spell Checker Programmatically
     Lesson 3 - Implement Check As You Type Mode
    Spell Check Algorithms
    Dictionaries
   [Expand]Visual Elements
   [Expand]Examples
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Lesson 1 - Configure Spell Checking Behavior

In MVVM-based applications, you can add the spell-checking functionality to the RichEditControl or any other supported text editor using the SpellChecker behavior mechanism.

This topic shows how to add the SpellChecker behavior to the RichEditControl and other supported text editors.

Expanded Add RichEditSpellChecker Behavior to the RichEditControl

Perform the following steps to add the spell-checking functionality to the RichEditControl:

  1. Open the RichEditControl' smart tag and click MVVM Behaviors and Services button;

  2. Click the Add behavior item and select RichEditSpellChecker from the invoked list;

  3. Specify the desired properties in the invoked RichEditSpellChecker menu.

  4. You can add dictionaries to the SpellCheckerDictionaryCollection directly in XAML. The SpellChecker supports using Simple, ISpell, OpenOffice and a Hunspell dictionaries. Refer to the Dictionaries topic for details.

    The RichEditSpellChecker uses the dictionary that corresponds with the RichEditSpellChecker.Culture value. Make sure that dictionaries for all used cultures are added to the DictionaryCollection.

    As a result, the XAML code looks as shown in the code snippet below.

    You can add this code directly to the MainWindow.xaml document. Before that, make sure that the following namespace attributes are added:

Expanded Add DXSpellChecker Behavior to Other Text Editors

The DXSpellChecker behavior smart tag configuration is available for DevExpress TextEdit and MemoEdit, and standard System.Windows.Controls.TextBox and System.Windows.Controls.RichTextBox controls. Follow the steps below to implement the spell checking functionality to any of these controls:

  1. Open the editor's smart tag and click MVVM Behaviors and Services button;

  2. Click the Add behavior item and select DXSpellChecker from the invoked list;

  3. Specify the desired properties in the invoked DXSpellChecker menu.

  4. You can add dictionaries to the SpellCheckerDictionaryCollection directly in XAML. The SpellChecker supports using Simple, ISpell, OpenOffice and a Hunspell dictionaries. Refer to the Dictionaries topic for details.

    The DXSpellChecker uses the dictionary that corresponds with the RichEditSpellChecker.Culture value. Make sure that dictionaries for all used cultures are added to the DictionaryCollection.

    Tip

    Refer to the How to: Bind Dictionaries to the Spell Checker in MVVM Applications topic for an example on how to bind dictionaries in MVVM-based applications.

    As a result, the XAML code looks as follows:

    You can add this code directly to the MainWindow.xaml document. Before that, make sure that the following namespace attributes are added:

Is this topic helpful?​​​​​​​