question

ajaygh-8933 avatar image
0 Votes"
ajaygh-8933 asked ·

UWP : How to count spelling mistakes in a String Or TextBox Text in C#?

I'm new to UWP development. I have a wpf code to get the spelling mistakes count of a text box Text. Now i want to implement the functionality of getting spelling mistakes count in UWP. Please help.

Here is the wpf code

 charCount = textBoxSpellChk.Text.Count();
 var split = textBoxSpellChk.Text.Split(' ', ',');
 errors = 0;
 foreach (var s in split)
 {
     var spellTextBox = new TextBox();
     spellTextBox.SpellCheck.IsEnabled = true;
     spellTextBox.Text = s;
    
     SpellingError e = spellTextBox.GetSpellingError(0);
    
     if (e != null)
     {
          errors++;
     }
 }


windows-uwpwindows-uwp-xamlwindows-uwp-runtime
· 3
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello, do you have any other questions?

1 Vote 1 · ·
ajaygh-8933 avatar image ajaygh-8933 RichardZhang-MSFT ·

No. Thank you for your reply.

0 Votes 0 · ·

Hello, I have converted the previous reply to answer, if it's helpful, you can accept it, thanks.

0 Votes 0 · ·

1 Answer

RichardZhang-MSFT avatar image
1 Vote"
RichardZhang-MSFT answered ·

Hello,​

Welcome to our Microsoft Q&A platform!

Currently UWP does not expose a corresponding API, and cannot get the number of misspelled characters like WPF

Thanks.

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.