Using the Built-In Spell Checker

You might not be aware that both the TextBox and RichTextBox controls offer a spelling checker for typed words, including a convenient pop-up menu that suggests appropriate alternatives, similar to what you see in Microsoft Word. Spell check is available only for English, German, Spanish, and French. To enable spell-checking, set the SpellCheck.IsEnabled attached property as True:

<RichTextBox Name="Rtb1" SpellCheck.IsEnabled="True"/>

Figure 3.2 shows an example of the spell check in action.

Image

Figure 3.2. Spell check in action.

With just a property assignment, you can enable this important feature in word-processing ...

Get Hidden WPF: Secrets for Creating Great Applications in Windows Presentation Foundation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.