void PrepareTool(ControlNode node, bool drag) { if (node != null) { var tool = new CreateComponentTool(node.Type); if (Shell.Instance.CurrentDocument != null) { Shell.Instance.CurrentDocument.DesignContext.Services.Tool.CurrentTool = tool; if (drag) { DragDrop.DoDragDrop(this, tool, DragDropEffects.Copy); } } } }