0

i want to add textbox1 spellcheck in framework 3.5 winform but its show error, how to add spellcheck in my textbox see below code and picture.

 textBox1.SpellCheck.IsEnabled = true;

Spellcheck Image

  • 1
    If you mean [SpellCheck](https://msdn.microsoft.com/en-us/library/system.windows.controls.spellcheck(v=vs.110).aspx) from WPF, then it will not work for winforms controls, because they don't support attached properties. See [this](http://stackoverflow.com/q/23834001/1997232), might be an option for you. – Sinatr Apr 12 '16 at 07:39
  • i am using Winform application not WPF – Adeel Aijaz Apr 12 '16 at 07:40

1 Answers1

1

As @Sinatr has write to you in comments - you can't use WPF Spellchecking in WinForms application.

In WinForms you need add some library. For example you can try use offline The NetSpell project It's a little bit old library. Or you can use newer but still beta Spell Check Winforms TextBox

UPDATE: NetSpell is free. You can find manual by this link NetSpell - Spell Checker for .NET in Using the Library section.

There is also possibility to add in your WinForms application control named ElementHost. It will allow you to insert in your application WPF TextBox. And you will be able to set SpellCheck.IsEnabled property for this TextBox inside ElementHost.

Here is nice link about ElementHost: Hosting WPF controls in a WinForms application

Alexej Sommer
  • 2,677
  • 1
  • 14
  • 25