Alessandro Del Sole's Blog

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

My Links

News

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 2012

Order my book about VB 2012 on Amazon My book "Visual Basic 2012 Unleashed" is available. Click the cover!

My new book on LightSwitch!

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

Your visits

campusMVP.NET - Tutored online training for Microsoft developers

Follow me on Twitter!

Messenger me!


CyberInstaller Beta Tester

Download CIS 2008!!

CodePlex download Download my open-source projects from CodePlex!

Search the blog



Article Categories

Archives

Post Categories

.NET Framework

Blogroll

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.

Alessandro

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

Feedback

No comments posted yet.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 6 and 1 and type the answer here:

Powered by:
Powered By Subtext Powered By ASP.NET