private static void _pasteLayerage(CanvasDevice customDevice, IList <Layerage> children) { for (int i = 0; i < children.Count; i++) { Layerage child = children[i]; LayerageCollection._pasteLayerage(customDevice, child.Children); // ILayer child2 = child.ClipboardSelf; ILayer clone2 = child2.Clone(customDevice); Layerage clone = clone2.ToLayerage(); LayerBase.Instances.Add(clone2); // children[i].Id = clone.Id; } }
/// <summary> /// Paste a layerage ( form Clipboard to Layerbase). /// </summary> /// <param name="customDevice"> The custom-device. </param> /// <param name="layerage"> The layerage. </param> public static Layerage PasteLayerage(CanvasDevice customDevice, Layerage layerage) { Layerage child = layerage.Clone(); // ILayer child2 = child.ClipboardSelf; ILayer clone2 = child2.Clone(customDevice); Layerage clone = clone2.ToLayerage(); LayerBase.Instances.Add(clone2); // clone.Children = child.Children; child.Children = null; LayerageCollection._pasteLayerage(customDevice, clone.Children); return(clone); }