Alessandro Del Sole's Blog

/* A programming space about Microsoft® .NET® */
posts - 159, comments - 0, trackbacks - 0

My Links


Your host

This is me! This space is about Microsoft® .NET® and Microsoft® Visual Basic development. Enjoy! :-)

These postings are provided 'AS IS' for entertainment purposes only with absolutely no warranty expressed or implied and confer no rights.

Microsoft MVP

My MVP Profile

I'm a VB!

Watch my interview in Seattle

My new book on VB 2015!

Pre-order VB 2015 Unleashed Pre-order my new book "Visual Basic 2015 Unleashed". Click for more info!

My new book on LightSwitch!

Visual Studio LightSwitch Unleashed My book "Visual Studio LightSwitch Unleashed" is available. Click the cover!

Your visits

Follow me on Twitter!

CodePlex download Download my open-source projects from CodePlex!

Article Categories


Post Categories

.NET Framework


Help Authoring

Microsoft & MSDN

Setup & Deployment

Visual Basic 2005/2008/2010

Enabling spell check in WPF applications

Did you already know that the TextBox and RichTextBox controls in Windows Presentation Foundation offer spell check support? Yes, just like Microsoft Word, so typed words are checked and correct alternatives are proposed via a popup menu.

That's cool! But you can take the advantage of this only if your system is localized on English, French, Spanish and German languages.

Anyway, spell check can be enabled just setting the SpellCheck.IsEnabled attached property to True as follows:

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

and this is just what we need to obtain the following result:

With just a half line of code we can implement an important feature in our word processing applications. There are a couple of limitations: the first one, is related to the available languages as mentioned above. The second one, custom dictionaries are not supported in this version of WPF.

If you're running the English localization of Windows Vista, remember to set the Language Bar to EN instead of the language set for your Country.


Print | posted on sabato 3 gennaio 2009 17:22 | Filed Under [ Windows Presentation Foundation ]


No comments posted yet.

Post Comment

Please add 2 and 3 and type the answer here:

Powered by:
Powered By Subtext Powered By ASP.NET