示例#1
0
        private void InkPresenterOnStrokesErased(InkPresenter sender, InkStrokesErasedEventArgs args)
        {
            foreach (var stroke in args.Strokes.OrderByDescending(s => s.Id))
            {
                UndoStrokes.Push(stroke);
            }

            InkToShapeAssKicker.EraseStrokes(args.Strokes);
        }
示例#2
0
        public InkOperator(InkCanvas inkCanvas)
        {
            InkCanvas = inkCanvas;
            InkCanvas.InkPresenter.InputDeviceTypes = CoreInputDeviceTypes.Pen;

            InkToShapeAssKicker = new InkToShapeAssKicker(inkCanvas);

            UndoStrokes = new Stack <InkStroke>();
            InkCanvas.InkPresenter.StrokesCollected += InkPresenterOnStrokesCollected;
            InkCanvas.InkPresenter.StrokesErased    += InkPresenterOnStrokesErased;
        }