views:

676

answers:

4

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:

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=470233

A: 

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.. :(

Arcturus
+1  A: 

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.

Ruud v A
Thanks for the link - I had read that page before, but what I was really looking for were any accounts of people breaking into the control with reflection or similar work arounds or failing that, any news on it being supported in the future. I agree it doesn't look possible at the moment though which is why I've put a request on Connect - hopefully Microsoft will add it eventually...
Tom Allen
A: 

Just FYI. Custom dictionaries will be in WPF 4.0. Refer to tweet http://twitter.com/kevingj/status/2954272004 from Kevin Gjerstad the Group Program Manager for WPF at Microsoft.

Cheers S.

Stephen Skehan
A: 

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.

David Veeneman
True, it's not exactly fully fledged, but from the limited time I've played with WPF 4.0 so far (I've mainly been looking at SL 4.0), it seems like it will work well enough for our needs :)
Tom Allen