XtraSpellChecker: Check Spelling as You Type

WinForms Team Blog
24 September 2007

Did you know that the XtraSpellChecker Suite can check spelling as you type? Just like in MS Word or Outlook.

Enabling this feature is a breeze, just set one property and call one method:

Set the SpellCheckMode property to AsYouType:

spellChecker1.SpellCheckMode = SpellCheckMode.AsYouType;

Then call the SpellChecker.Check method, and you're set:

spellChecker1.Check(memoEdit1);

After enabling the "check as you type" feature, red curves are displayed under misspelled words. Words are underlined to show that the spell checker doesn't recognize them.

Check spelling as you type

 

The appearance of the red curves are fully customizable. If you prefer Blue then set the SpellChecker.CheckAsYouTypeOptions.Color property:

Set the CheckAsYouTypeOptions property

To correct a misspelled word just right-click on the misspelled word and you'll get a list of suggested words from the dictionary:

Blue lines

Parts [1] and [2] of this series showed the XtraSpellChecker's other capabilities. In a future post, you'll see how different dictionaries can be used to make XtraSpellChecker conform to your needs.

Are you curious about other XtraSpellChecker features?

Which features are your favorites?

Please leave a comment below and let me know. Thanks!

4 comment(s)
Anonymous
Jason Bott

Hello,

I was told that as-you-type spell checking only works for one control at a time on a given form.  Could you confirm whether this is true?

Thanks!

25 September, 2007
Mehul Harry (DevExpress)
Mehul Harry (DevExpress)

Hi Jason,

You can check multiple controls by using multiple XtraSpellChecker components. Also, the SharedDictionaryStorage component might be useful for you. It's required if you need to use several XtraSpellChecker components with different settings but with the same dictionary storage in one application.

Thanks.

25 September, 2007
Anonymous
AshleyT

Where should this code go?  In the Load Event of the form?

28 September, 2007
Alan (DevExpress)
Alan (DevExpress)

Hello Ashley,

It depends upon your particular scenario, but of course, you can add this code to a form's Load event.

For example, please see the following application, which demonstrates how this can be done: community.devexpress.com/.../MultipleCheckAsYouType.zip

1 October, 2007

Please login or register to post comments.