示例#1
0
        private void InkPresenter_StrokesCollected(
            Windows.UI.Input.Inking.InkPresenter sender,
            Windows.UI.Input.Inking.InkStrokesCollectedEventArgs args)
        {
            InkStroke stroke = inkCanvas.InkPresenter.StrokeContainer.GetStrokes().Last();

            Line line = ConvertStrokeToXAMLLine(stroke);

            ShapesCanvas.Children.Add(line);

            // We delete the InkStroke from the InkCanvas
            stroke.Selected = true;
            inkCanvas.InkPresenter.StrokeContainer.DeleteSelected();
        }
        private void InkPresenter_StrokesCollected(
            Windows.UI.Input.Inking.InkPresenter sender,
            Windows.UI.Input.Inking.InkStrokesCollectedEventArgs args)
        {
            InkStroke stroke = inkCanvas.InkPresenter.StrokeContainer.GetStrokes().Last();

            // Action 1 = We use a function that we will implement just after to create the XAML Line
            Line line = ConvertStrokeToXAMLLine(stroke);

            // Action 2 = We add the Line in the second Canvas
            ShapesCanvas.Children.Add(line);

            // We delete the InkStroke from the InkCanvas
            stroke.Selected = true;
            inkCanvas.InkPresenter.StrokeContainer.DeleteSelected();
        }
示例#3
0
 private void InkPresenter_StrokesCollected(Windows.UI.Input.Inking.InkPresenter sender, Windows.UI.Input.Inking.InkStrokesCollectedEventArgs args)
 {
     strokeTimer.Stop();
     inkAnalyzer.AddDataForStrokes(args.Strokes);
     foreach (InkStroke stroke in args.Strokes)
     {
         // since this is a drawing application, we can tell InkAnalyzer about
         // the nature of the stroke - it's optional but will improve the shape
         // recognition result for small drawings that may get confused with
         // handwritten letters
         inkAnalyzer.SetStrokeDataKind(stroke.Id, InkAnalysisStrokeKind.Drawing);
     }
     strokeTimer.Start();
 }
 private void InkPresenter_StrokesCollected(Windows.UI.Input.Inking.InkPresenter sender, Windows.UI.Input.Inking.InkStrokesCollectedEventArgs args)
 {
     rootPage.NotifyUser(args.Strokes.Count + " strokes collected!", SDKTemplate.NotifyType.StatusMessage);
 }
示例#5
0
 private void InkPresenter_StrokesCollected(Windows.UI.Input.Inking.InkPresenter sender, Windows.UI.Input.Inking.InkStrokesCollectedEventArgs args)
 {
     foreach (var stroke in args.Strokes)
     {
         inkRecognizer.AddStroke(stroke);
     }
 }