public void PasteControlsFromClipboard(Container where) { if (CanPasteFromClipboard()) { var box = Clipboard.GetDataObject().GetData(CLIPBOARD_PLAYERCONTROLS_FORMAT) as Collection <SerializationHelper.SerializablePlayerControl>; if (box == null) { return; } var added = new Collection <SkinnableControl>(); foreach (var clipb in box) { System.Xml.XmlDocument copy_xml = clipb.XmlDocument; Dictionary <string, System.IO.MemoryStream> copy_resources = clipb.Resources; var controlElement = copy_xml.ChildNodes[1]; SkinnableControls.SkinnableControl copy = SerializationHelper.GetPlayerControlInstanceFromTagName(controlElement.Name); copy.ParentView = this; copy.FromXmlElement((System.Xml.XmlElement)controlElement, copy_resources); copy.Parent = where; copy.Location = new PointF(copy.Location.X + 15, copy.Location.Y + 15); added.Add(copy); } this.SelectMultiple(added); if (DesignerControlsTreeChanged != null) { DesignerControlsTreeChanged(this, new EventArgs()); } } }