Click here to Skip to main content
15,509,322 members
Please Sign up or sign in to vote.
1.75/5 (4 votes)
Hi, I am developing a note taking application in C#/XAML. I want a user to write anything on canvas with InkManager of "Windows.UI.Input.Inking". Then I want to display it as text onto canvas and then I want to save those recognized text in either text or image format.

I have checked MSDN[^] documentation, but still I am confused how to start. How can I get ink strokes onto canvas and how can I recognize that ? Please anyone can guide me ? I need it ASAP for my app.

I have tried some coding, but it is not working.

C#
private async void Recognize_Click(object sender, RoutedEventArgs e)
{
    IReadOnlyList<InkRecognitionResult> x = await _inkManager.RecognizeAsync(InkRecognitionTarget.All);
    IReadOnlyList<String> text;
    foreach (InkRecognitionResult i in x)
    {
        text = i.GetTextCandidates();
    }
}
Posted
Updated 9-Jul-12 0:17am
v2
Comments
bbirajdar 9-Jul-12 7:00am    
Please do not repost the same question

http://www.codeproject.com/Questions/415462/hand-writing-recognition-in-csharp-metro-style-app.aspx
Farhan Ghumra 9-Jul-12 8:01am    
404 Not Found
bbirajdar 9-Jul-12 8:08am    
Its not 404..Its 'Question not found' since you deleted it..404 is for 'Page not found'..Nice try...
Farhan Ghumra 9-Jul-12 8:24am    
Any way I got solution from MSDN forum.

1 solution

Here is my solution

C#
IReadOnlyList<string> text;
string finalt = "";
private async void Recognize_Click(object sender, RoutedEventArgs e)
{
    IReadOnlyList<inkrecognitionresult> x = await _inkManager.RecognizeAsync(InkRecognitionTarget.All);
    foreach (InkRecognitionResult i in x)
    {
        text = i.GetTextCandidates();
        finalt = finalt + " " + text[0];
        res.Text = finalt;   //res is x:Key of the textblock
    }


Solution by Subramanian : InkPen with Handwriting Recognition sample in CSharp[^]

Solution by Can: Windows 8 Input: Ink sample in C#/Xaml[^]

Kudos To Subramanian[^] and Can[^]
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900