c# - WPF Handwriting .NET 4.5 Windows 8: Missing IAWinFX.dll and others -


i trying use text recognition wpf inkcanvas control on windows 8.1 computer .net 4.5.

note: **wpf inkcanvas control windows 8.1 **, not windows forms, nor windows apps!

according should quite easy:

msdn: handwriting recognition

however when paragraph stuck.

add reference wpf ink analysis assemblies, iawinfx.dll, iacore.dll, , ialoader.dll, can found in \program files\reference assemblies\microsoft\tablet pc\v1.7. replace contents of code behind file following code.

i not have these files on computer. tried on windows 7 pro pc , can still not find them.

from searching stackoverflow , elsewhere seems other people have had similar issues, , there seem several different versions of inking/handwriting recognition available. instance appears putting in windows 8 store app should quite easy. question wpf program .net 4.5 per msdn documentation!

i went down exact same path you, , have solution. msdn handwriting recognition link stated doesn't work, , because relies on inkanalyzer class available if install tablet pc v1.7 sdk on xp machine (it won't install on windows 8).

having said that, installing tablet pc v1.7 sdk does install microsoft.ink.dll, can use perform handwriting recognition. downside have take wpf inkcanvas strokes , save them microsoft.ink.inkcollector strokes.

the solution follows:

1) install windows xp tablet pc sdk v1.7

2) follow of same source code outlined msdn handwriting recognition guidance, except for buttonclick implementation.

3) add reference wpf application browsing , selecting dll: c:\program files (x86)\microsoft tablet pc platform sdk\include\microsoft.ink.dll

4) add 'using microsoft.ink' statement top of mainwindow.xaml.cs file, , add following code 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());                 }             }         }     } 

that's it!!! 1 important note i'd add. if trying handwriting recognition on windows 10 or later, , you're not hindered having write desktop wpf app, highly recommend usage of directink technology. i've tested on windows 10 rc , much easier use. unfortunately, works universal apps (metro) , not desktop apps (wpf).


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -