WPF TextBox Custom Dictionary Support

WPF TextBox Custom Dictionary Support

Has anyone found a workaround yet for getting custom dictionary support working for the built in spellchecking on WPF TextBoxes/RichTextBoxes? We've been probing the spelling stuff with reflector hoping to find where the dictionary entries are coming from, but it's looking very much like it's going to be a COM object....

I know it's not currently supported and that Microsoft were looking into supporting it in a future release, but that was quite a while ago and I can't seem to find any recent news about it.

Clutching at staws, I've posted a suggestion up on Connect:


Is it possible to change properties on a sub item in a DataTemplate using triggers from the containing control?


Retaining font size when loading/saving RTF in WPF

Custom Control and DependencyProperty

WPF TreeView with Multiple Selection [closed]


WPF 4.0 custom dictionary support is still pretty weak.

You can create a custom dictionary as a text file with a .lex extension, and manually add words to it that the spell checker will use in addition to its own built-in dictionary.

Details in this MSDN article, and a blog post here.. But there is no way for the user to add an unrecognized word to the dictionary, short of exiting the app, opening the .lex file in Notepad, and typing it in.

In other words, there is no "Add to dictionary" item on the spell-check context menu, even if a custom dictionary is in use.

Custom dictionaries are useful, I suppose, for technical fields with well-defined terminology, which can be set up in a .lex file in advance.

But the WPF spell-checker is pretty weak as a general purpose spell-checker..


Unfortunately this is impossible.

http://www.dev102.com/2008/03/25/customize-spellcheck-on-wpf-text-controls/. The dictionaries are a direct copy of those used in Office 2007..


I too was looking for other spelling dictionaries... See my question here: http://stackoverflow.com/questions/209026/does-wpfs-textbox-support-spell-check-dictionaries-for-the-netherlands. It seems they only support 4 languages..


94 out of 100 based on 44 user ratings 544 reviews