我正在寻找 WPF 拼写检查控件(类似于内置功能,但支持更多词典)。我需要它具有即时输入功能(红色下划线)。与内置的 .NET 4.0 拼写检查相比,它还应该支持 4 种以上的语言(例如英语、西班牙语、德语、意大利语和俄语支持就更好了)。
我更喜欢该控件拥有 MIT 或 BSD 许可证,可以在商业 Windows 应用程序中使用。源代码会很棒,因为我想将拼写建议集成到我的自定义右键单击上下文菜单中。
I am looking for a WPF spell checking control (similar to the in-built functionality but with support for more dictionaries). I need it to have the as-you-type functionality (red underlining). It should also support more than 4 languages than the in-built .NET 4.0 spell check (e.g. English, Spanish, German, Italian and Russian language support would be great).
I prefer the control have a MIT or BSD license that can be used within a commercial Windows application. Source code would be great as I would like to integrate the spelling suggestions into my custom right click context menu.
发布评论
评论(2)
我将 AvalonEdit 与 NHunspell 通过添加我自己的 SpellCheckerBehavior。可以在 github 找到此示例项目。它是这样实现的:
...像这样修改我的 MainWindow 的构造函数:
...并将以下类添加到我的项目中以集成它们:
I combined AvalonEdit with NHunspell by adding my own SpellCheckerBehavior. An example project of this can be found at github. It is implemented like this:
...modifying my MainWindow's constructor like this:
...and adding the following classes to my project to integrate them:
AvalonEdit ( http://www.codeproject.com/KB/edit/AvalonEdit.aspx ) 是在 WPF 中为 SharpDevelop 从头开始编写的。哦,快速谷歌的奇迹。
如果您一次只使用一种语言(但可切换),则可以使用默认的 WPF 功能 ( http://joshsmithonwpf.wordpress.com/2007/02/17/spellchecking-and-suggested-spellings-in-a-textbox/)
AvalonEdit ( http://www.codeproject.com/KB/edit/AvalonEdit.aspx ) was written from the ground up in WPF for SharpDevelop. Oh the wonders of a quick Google.
And if you're fine with one language at a time (but toggable), you can use the default WPF functionality ( http://joshsmithonwpf.wordpress.com/2007/02/17/spellchecking-and-suggested-spellings-in-a-textbox/ )