I just went the same way as you, and I have a solution. The MSDN handwriting recognition link that you specified simply does not work, and this is due to the fact that it depends on the InkAnalyzer class, which is only available if you install the Tablet PC v1.7 SDK on an XP computer (it will not installed on Windows 8).
Having said that installing the Tablet PC v1.7 SDK installs Microsoft.Ink.dll, which you can use to recognize handwriting. The only drawback is that you will need to execute your strokes in InkCanvas WPF and save them in strokes of Microsoft.Ink.InkCollector.
The solution is as follows:
1) Install Windows XP Tablet PC SDK v1.7
2) Follow all of the same source code that is described in the MSDN Handwriting Recognition Guide , except for the implementation of buttonClick.
3) Add a link to your WPF application by browsing and selecting this DLL: C: \ Program Files (x86) \ Microsoft Tablet PC Platform SDK \ Include \ Microsoft.Ink.dll
4) Add the instruction "Microsoft.Ink" to the beginning of the MainWindow.xaml.cs file and add the following code to your buttonClick method:
private void buttonClick(object sender, RoutedEventArgs e) { using (MemoryStream ms = new MemoryStream()) { theInkCanvas.Strokes.Save(ms); var myInkCollector = new InkCollector(); var ink = new Ink(); ink.Load(ms.ToArray()); using (RecognizerContext myRecoContext = new RecognizerContext()) { RecognitionStatus status; myRecoContext.Strokes = ink.Strokes; var recoResult = myRecoContext.Recognize(out status); if (status == RecognitionStatus.NoError) { textBox1.Text = recoResult.TopString; theInkCanvas.Strokes.Clear(); } else { MessageBox.Show("ERROR: " + status.ToString()); } } } }
What is it!!! One important note that I would like to add. If you are trying to recognize handwriting in Windows 10 or later, and you are not bothering to write a WPF desktop application, I highly recommend using their DirectInk technology. I tested it on Windows 10 RC and it is much easier to use. Unfortunately, it only works with its Universal Apps (Metro) applications, and not with Desktop Apps (WPF).
source share