Page 1 of 1

Spelling check in C# (WPF) How to use SpellCheck in C# (Windows Presentation Foundation).

#1 PixelCard  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 48
  • View blog
  • Posts: 139
  • Joined: 20-June 08

Posted 12 July 2008 - 07:58 AM

Many users want to implement some spelling check functionality in their applications. Writing own spelling libraries is a hard task, so, there is a built-in SpellCheck functionality in the .NET Framework. At this time, it works in Windows Presentation Foundation applications.

Tutorial Requirements:
  • C# IDE (Visual Studio 2008 used in this tutorial)
  • .NET Framework 3.5

So, here we go.

1. Create a new C# WPF Application:

Posted Image

2. Add a TextBox to your form:

Posted Image

In the XAML tab, add the following code between TextBox tags:

SpellCheck.IsEnabled = "True"



You can add the same code in the standard C# code window. Just enter:

textBox1.SpellCheck.IsEnabled = True;



Now, launch the application. You get something like this:

Posted Image

If you enter incorrect words, these are underlined in red. If you right-click the word, you get some spelling suggestions to correct.

Congratulations! The project is done.

Attached File(s)



Is This A Good Question/Topic? 1
  • +

Replies To: Spelling check in C# (WPF)

#2 EnvXOwner  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 357
  • View blog
  • Posts: 2,319
  • Joined: 10-August 09

Posted 01 September 2009 - 12:22 PM

Awesome dude
Was This Post Helpful? 1
  • +
  • -

#3 dawmail333  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 27
  • View blog
  • Posts: 174
  • Joined: 02-July 07

Posted 25 January 2010 - 07:15 PM

I can't believe I never noticed that!
Was This Post Helpful? 0
  • +
  • -

#4 nnti11  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 29-March 11

Posted 26 September 2012 - 03:12 AM

Very nice tip
:online2long:
Was This Post Helpful? 0
  • +
  • -

#5 zofi51  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 02-October 12

Posted 15 October 2012 - 12:23 PM

more examples like this one?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1