public ToolBoxItemControl(ToolBoxItem toolBoxItem, ToolBoxItemDelegate toolBoxItemDelegate) { InitializeComponent(); this.toolBoxItem = toolBoxItem; this.toolBoxItemDelegate = toolBoxItemDelegate; ToolBoxText.Text = toolBoxItem.ToString(); }
public void AddToolBoxItem(ToolBoxItem toolBoxItem, ToolBoxItemDelegate toolBoxItemDelegate) { ToolBoxItemControl toolBoxItemControl = new ToolBoxItemControl(toolBoxItem, toolBoxItemDelegate); if (this.toolBoxItems.Count > 0) { this.UpdateMargin(toolBoxItemControl); } ToolBoxContainer.Children.Add(toolBoxItemControl); this.toolBoxItems.Add(toolBoxItemControl); }