Пример #1
0
        public ToolBoxItemControl(ToolBoxItem toolBoxItem, ToolBoxItemDelegate toolBoxItemDelegate)
        {
            InitializeComponent();

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

            ToolBoxText.Text = toolBoxItem.ToString();
        }
Пример #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);
        }