Input: Simplified ink sample

This sample demonstrates how to use ink functionality (such as, capturing, manipulating, and interpreting ink strokes) in Windows Store apps using JavaScript, C#, and C++. This is a lightweight version of Input: Ink sample that exposes app commands ...

4 Star
13,684 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Windows10 Support?
    3 Posts | Last post March 22, 2017
    • On some windows 10 computer I am getting the following exception. 
      The exception is thrown in the constructor of the InkManager 
      System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
         at Windows.UI.Input.Inking.InkManager..ctor()
      Are there some prerequests missing on Windows10?
    • Have you ever found a solution to this? I have the exact same problem.
    • I think I found the solution;
  • Sample Broken with Surface 3 Pen
    1 Posts | Last post June 30, 2014
    • This sample works with Surface Pro 2 Pen, but not the Pen for the Surface Pro 3.  Can someone shed light on why the Pro 3 Pen behaves differently?
  • Beware: PointerRoutedEventArgs.GetIntermediatePoints is in reverse order
    1 Posts | Last post November 07, 2013
    • Notice in Scenario1.xaml.cs line 154, that the intermediate points from PointerRoutedEventArgs.GetIntermediatePoints are read in REVERSE order.
      This is not at all clear in the api for GetIntermediatePoints.
      If you port this code to your own app, make sure you parse the intermediate points in reverse.
      See this blog post for what can happen on devices when using touch input. You probably won't see the bug on desktop, or using a mouse or pen.
  • how to select by pen or Mouse
    1 Posts | Last post December 21, 2012
    • i want to do selection form Mouse or pen so that how which code i have to Cheng in this code sample  
  • Erasing by point
    1 Posts | Last post September 24, 2012
    • I'm attempting to modify this sample so that instead of erasing the entire stroke, I'm only erasing the part of the stroke that the eraser touches. To do this, I need to find out which strokes cross the eraser's path, so I use InkManager.SelectWithLine() and then check the ink manager to see which strokes are selected. I tried to Clone() those strokes so I can erase a segment and generate new stroke(s) with the remaining points. I delete the Selected strokes from the ink manager, then I add the new strokes to the ink manager.
      I can do this successfully to one stroke, but then when I try to erase one of the new strokes, I get an AccessViolationException at SelectWithLine().
      So in PointerMoved, I have
      Point p1 = previousPoint; //from PointerPressed
      Point p2 = currentPoint;
      Rect iRect = inkManager.SelectWithLine(p1,p2);
      if (iRect.Width !=0 && iRect.Height !=0)
        InkStrokeContainer strokesToErase = new InkStrokeContainer;
        foreach (var stroke in inkManager.GetStrokes())
           if (stroke.Selected)
        //do my own processing of the strokes in strokesToErase, create new strokes and add them to the inkManager
        // clear all strokes from the rendering, and render all strokes
      What am I doing wrong??
      Thank you in advance!!