Capello dvd player directv
InkAnalyzer.AddDataForStrokes(inkStrokes) Private async void RecognizeStrokes_Click(object sender, RoutedEventArgs e)
/ Event args for the button click routed event Finally, delete the recognized nodes from the InkAnalyzer and the corresponding ink strokes from the ink canvas.Iterate through both sets of node types and draw the respective text or shape on the recognition canvas (below the ink canvas).If Status returns a state of Updated, call FindNodes for both InkAnalysisNodeKind.InkWord and InkAnalysisNodeKind.InkDrawing.Call AnalyzeAsync to initiate ink analysis and get the InkAnalysisResult.We're trying to recognize both drawings and text, but you can use the SetStrokeDataKind method to specify whether you're interested only in text (including document structure and bullet lists) or only in drawings (including shape recognition).If ink strokes are present, pass them in a call to AddDataForStrokes of the InkAnalyzer.First, call GetStrokes on the StrokeContainer of the InkCanvas.InkPresenter to get the collection of all current ink strokes.Recognize.Click += RecognizeStrokes_Click įor this example, we perform the ink analysis in the click event handler of the "Recognize" button. Listen for button click to initiate recognition. InkDrawingAttributes drawingAttributes = new InkDrawingAttributes() ĭrawingAttributes.Color = Windows.UI.Colors.Black ĭrawingAttributes.IgnorePressure = false
A listener for the click event on the "Recognize" button is also declared.Ink strokes are rendered on the InkCanvas using the specified InkDrawingAttributes.The InkPresenter is configured to interpret input data from pen, mouse, and touch as ink strokes ( InputDeviceTypes).Next, we set some basic ink input behaviors: InkAnalysisResult inkAnalysisResults = null We then specify our global variables: InkAnalyzer inkAnalyzer = new InkAnalyzer() In the UI code-behind file (), add the namespace type references required for our ink and ink analysis functionality: The original ink strokes are then deleted from the ink canvas. When the "Recognize" button is pressed, all ink strokes on the ink canvas are analyzed and (if recognized) corresponding shapes and text are drawn on the standard canvas. The UI includes a "Recognize" button, an InkCanvas, and a standard Canvas. In this example, recognition is initiated when the user clicks a button to indicate they are finished drawing.ĭownload this sample from Ink analysis sample (basic) For basic, single-line, plain text scenarios such as form input, see Constrained handwriting recognition later in this topic.