public void Duplicate() { if (SelectedStrokesIds.Count > 0) { Clipboard = new StrokeList(SelectedStrokes); } if (Clipboard == null) { return; } SelectionChanged?.Invoke(new StrokeList()); var copiedStrokes = new StrokeList(); var translationMatrix = Constants.DuplicationTransform; var offset = 0; foreach (var s in Clipboard.OrderBy(x => (x as StrokeModel)?.CreatedDate)) { var strokeModel = new StrokeModel(s.Clone(), UserId); strokeModel.CreatedDate = strokeModel.CreatedDate.AddMilliseconds(offset++); strokeModel.Transform(translationMatrix, false); copiedStrokes.Add(strokeModel); } Strokes.Add(new StrokeCollection(copiedStrokes)); SelectionChanged?.Invoke(copiedStrokes); EditingMode = InkCanvasEditingMode.Select; }