private void InkPresenterOnStrokesErased(InkPresenter sender, InkStrokesErasedEventArgs args) { foreach (var stroke in args.Strokes.OrderByDescending(s => s.Id)) { UndoStrokes.Push(stroke); } InkToShapeAssKicker.EraseStrokes(args.Strokes); }
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; }