Exemplo n.º 1
0
        public ToolBoxItemControl(ToolBoxItem toolBoxItem, ToolBoxItemDelegate toolBoxItemDelegate)
        {
            InitializeComponent();

            this.toolBoxItem         = toolBoxItem;
            this.toolBoxItemDelegate = toolBoxItemDelegate;

            ToolBoxText.Text = toolBoxItem.ToString();
        }
Exemplo n.º 2
0
        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);
        }