Solved

SpellChecker problem in RichTextBox in WPF in VS 2008

Posted on 2007-11-23
4
902 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

759 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

21 Experts available now in Live!

Get 1:1 Help Now