dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.04k stars 1.16k forks source link

SpellCheck with CustomDictionaries stopped working #9701

Open Krudonix opened 2 weeks ago

Krudonix commented 2 weeks ago

Description

Hi,

SpellCheck with CustomDictionaries stopped working after an update in windows 11.

Issue also posted here https://stackoverflow.com/questions/77258504/wpf-spellcheck-on-windows-11-systems

Many thanks,

Reproduction Steps

Create WPF app. With abcd added to the Custom.lex

<TextBox SpellCheck.IsEnabled="True" Text="abcd abcd">
     <SpellCheck.CustomDictionaries>
         <sys:Uri>pack://application:,,,/Custom.lex</sys:Uri>
     </SpellCheck.CustomDictionaries>
</TextBox>

Expected behavior

abcd to not be highlighted as a spelling error

Actual behavior

abcd being incorrectly highlighted

Regression?

This worked in a previous version of windows 11.

Definitely an issue on version 23H2 22631.4037 Seems to work on an old dev machine with 22H2 22621.1265

Not sure at exactly which version this stopped working.

Known Workarounds

No response

Impact

No response

Configuration

Not working on net472 and net8

Other information

No response

lindexi commented 2 weeks ago

@Krudonix Could you update your project code? I'm afraid it's pack://application:,,,/Custom.lex's problem.

Krudonix commented 2 weeks ago

Even if I use SpellCheck.CustomDictionaries.Add(uri) to a hardcoded location it still doesn't work.