Welcome to Dream.In.Code
Become a C# Expert!

Join 136,883 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,724 people online right now. Registration is fast and FREE... Join Now!




Spelling check in C# (WPF)

 
Reply to this topicStart new topic

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

PixelCard
Group Icon



post 12 Jul, 2008 - 06:58 AM
Post #1


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:

IPB Image

2. Add a TextBox to your form:

IPB Image

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

CODE

SpellCheck.IsEnabled = "True"


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

csharp

textBox1.SpellCheck.IsEnabled = True;


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

IPB 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)
Attached File  spellCheckApp.zip ( 39.08k ) Number of downloads: 80
Go to the top of the page
+Quote Post


Register to Make This Ad Go Away!


Fast ReplyReply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 12/3/08 08:36PM

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month