void ToolboxItemCreated()
        {
            ToolboxItem        tool;
            ToolboxItemWrapper toolWrapper;

            if (TryGetSelectedToolboxItem(out tool, out toolWrapper))
            {
                if (null != this.AssociatedDesigner && null != this.AssociatedDesigner.Context)
                {
                    DesignerView target     = this.AssociatedDesigner.Context.Services.GetService <DesignerView>();
                    IDataObject  dataObject = toolWrapper.DataObject ?? new DataObject();
                    dataObject.SetData(DragDropHelper.WorkflowItemTypeNameFormat, toolWrapper.Type.AssemblyQualifiedName);
                    ((RoutedCommand)DesignerView.CreateWorkflowElementCommand).Execute(dataObject, target);
                }
                ToolCreatedEventArgs args = new ToolCreatedEventArgs(ToolCreatedEvent, this, tool.CreateComponents());
                RaiseEvent(args);
            }
        }
 void ToolboxItemCreated()
 {
     ToolboxItem tool;
     ToolboxItemWrapper toolWrapper;
     if (TryGetSelectedToolboxItem(out tool, out toolWrapper))
     {
         if (null != this.AssociatedDesigner && null != this.AssociatedDesigner.Context)
         {
             DesignerView target = this.AssociatedDesigner.Context.Services.GetService<DesignerView>();
             IDataObject dataObject = toolWrapper.DataObject ?? new DataObject();
             dataObject.SetData(DragDropHelper.WorkflowItemTypeNameFormat, toolWrapper.Type.AssemblyQualifiedName);
             ((RoutedCommand)DesignerView.CreateWorkflowElementCommand).Execute(dataObject, target);
         }
         ToolCreatedEventArgs args = new ToolCreatedEventArgs(ToolCreatedEvent, this, tool.CreateComponents());
         RaiseEvent(args);
     }
 }