Spell Check in Windows 8 Apps

I like using WinRT XAML for Windows 8 Apps, and another benefit showed itself the other day. I was asked to implement spell check in a textbox. Fortunately XAML already has this functionality built in. It is as simple as setting the IsSpellCheckEnabled Property to true on the textbox to enable spell check in Windows 8 apps. Further to this there is also a handy IsTextPredictionEnabled Property to provide text prediction (useful for tablets etc.). It is also possible to turn your textbox into a multiline textbox by setting the property AcceptsReturn to true.

I created a simple example to show you this below. You can see this is a very useful addition to Windows 8 Apps. I do not need to provide any dictionary, and the options to ignore the spelling mistake, and to add to dictionary are automatically included.

Spell Check in Windows 8
An example of spell check in a Windows 8 store app

Similarly this is also possible using HTML5. In fact it is on by default for  <textarea>  and elements with  contenteditable="true" attribute. If you want to enable this for text inputs, the property is slightly different:

I hope this helps you with providing more user friendly inputs.

Leave a Reply