WPF TextBox slowness with spellcheck enabled on Windows 10

Greg Arzoomanian 46 Reputation points
2020-09-21T19:35:50.397+00:00

We're seeing significant lag while typing into a WPF TextBox that has SpellCheck enabled on Windows 10. We see this with just a simple application containing a TextBox:

<Window x:Class="TestSpellCheck.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:TestSpellCheck"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
            <TextBox x:Name="textBox" TextWrapping="Wrap" Text="TextBox" AcceptsReturn="True" 
                     HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
                     SpellCheck.IsEnabled="True"/>
    </Grid>
</Window>

When I paste a section of text with a number of spelling errors (say, some Lorem Ipsum text), subsequent typing sees a lag of a few seconds between when I type a character and when it appears on the screen. This doesn't happen if the text I paste doesn't have spelling errors, or if I do this on Windows 7.

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
11,587 questions
Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,774 questions
{count} votes

3 answers

Sort by: Most helpful
  1. DaisyTian-1203 11,621 Reputation points
    2020-09-22T02:36:06.02+00:00

    Please check global dictionary registration key in the Registry Editor at:

    HKEY_CURRENT_USER\Software\Microsoft\Spelling\Dictionaries
    Key: Global

    Like the below picture shown:
    26325-capture.png

    Is there any temp dictionaries in the Value data? If there are, please delete them.then check your slowness resolved or not.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. John Restrepo Bedoya 1 Reputation point
    2020-10-05T14:32:59.797+00:00

    I am having a similar issue, in my case happens when I press the space bar, the control gets stuck while typing and start to drop letters, any update on your issue so far?

    0 comments No comments

  3. John Groft 1 Reputation point
    2020-12-02T20:03:00.88+00:00

    Our users have also reported the same issue. Interestingly enough, they say it started in early September. Prior to that there were no issues. As with @John Restrepo Bedoya , it seems to start after pressing the spacebar. (I suspect that's because the space signals to the spell checker that it's time to check a word.) As we continue to type, the textbox it begins to drop characters forcing corrections which slow it down even further.

    This is not so much an issue for simple fields, but for comments this is really causing a problem. The textbox can't keep up with even reasonably fast typing.

    I have tried the registry solution mentioned above. There was definitely a value in the global tag, but removing it had no effect. OS version is 1909

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.