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

  • Question

  • 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++;
        }
    }
    
    

    Sunday, February 2, 2020 4:47 AM