Solved

SpellChecker problem in RichTextBox in WPF in VS 2008

Posted on 2007-11-23
4
903 Views
Last Modified: 2013-11-26
I am trying to activate the spellchecking of a RichTextBox control but nothing happens.

I have tried (and double checked) the <RichTextBox SpellCheck.IsEnabled="True"/>, but nothing happens.

I have also downloaded 3 different demo projects that all demostrate the use of the new RichTextBox. All project builds and works perfectly, except for the spellchecker function which is totally silent. I have also tried to change the language using the attribute for this (since the OS language is Norwegian), but it does not help. Is the cause for this kind of problem known? Is the problem the OS language settings?

I am using VS 2005 with "VS 2008 addon" which seems to be working since I am able to open VS 2008 projects using the "selector".
0
Comment
Question by:lieka
  • 3
4 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 20354502
If you have something like this, it should highlight the mispelled words.
    <DockPanel xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Margin='8px'>

        <TextBlock DockPanel.Dock='Top' HorizontalAlignment='Center' FontSize='14pt' FontWeight='Bold'>Windows Presentation Foundation Spell Checker</TextBlock>

        <RichTextBox SpellCheck.IsEnabled='True'>

            <FlowDocument>

                <Paragraph Foreground='#17365D' Background='White' FontSize='12pt' FontFamily='Cambria'>Enter your text here to have it spell-checked. Like soo.</Paragraph>

            </FlowDocument>

        </RichTextBox>

    </DockPanel>

Open in new window

0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 20354505
0
 

Author Comment

by:lieka
ID: 20361574
Thanks! Finally there was a red line indicating a typo. But - the spellchecker is only concerned about the text added as the paragraph: <Paragraph ......>Enter your text here to have it spell-checked. Like soo.</Paragraph>
Wrongly spelled words ('soo') are indicated, but words added to the controll by editing are not spellchecked. Interestingly, words from the original sentence which are messed up by me inserting text into them are highlighted, but the random/nonsense text inserted into them are not higlighted.
Example: If I change "Enter your text here" to "Enter your te xt xt here" the 'te' and the second 'xt' becomes highlighted, while the inserted/first 'xt' is ignored by the spellchecker.

Should I invoke the spellcheck procedure as a response to any kind of event of the RichTextBox-control?
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 20362856
It appears that English is supported with the WPF, when typing in the RichTextBox, but I don't know what other languages are supported.

Bob
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Need help parsing JSON in my VB.Net application 4 44
vb.net 2 37
Please explain "Multi-Tenant Services" 5 63
How would you add MULTITHREADING to the attached C# code? 4 51
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now