Ejemplo n.º 1
0
        public void Undo()
        {
            foreach (var strokeId in StrokeIds)
            {
                var stroke = StrokeManager.GetStroke(strokeId);
                stroke.Selected = true;
            }

            InkStrokeContainer.DeleteSelected();
        }
Ejemplo n.º 2
0
        public bool RemoveStroke(InkStroke stroke)
        {
            var deleteStroke = GetStrokes().FirstOrDefault(s => s.Id == stroke.Id);

            if (deleteStroke == null)
            {
                return(false);
            }

            ClearStrokesSelection();
            deleteStroke.Selected = true;
            _strokeContainer.DeleteSelected();

            RemoveStrokeEvent?.Invoke(this, new RemoveEventArgs(stroke));
            return(true);
        }