I am making a math worksheet app where you can write in the answer below the problem using an InkCanvas
. The problem is that if you write a "1" the way most people do it looks like "|", and is recognized as a vertical bar. It seems there should be some way to set the InkRecognizerContainer
to recognize only numbers, but I can't find any way to do it. Is this possible?
Here's my current code:
var recognitionResults = await inkRecognizerContainer.RecognizeAsync(inkCanvas.InkPresenter.StrokeContainer, InkRecognitionTarget.All)
string answerString = string.Empty;
foreach (var result in recognitionResults)
{
answerString += result.GetTextCandidates()[0];
}
int submittedAnswer = Convert.ToInt32(answerString);