Example #1
0
 private void UpdateMargin(ToolBoxItemControl toolBoxItemControl)
 {
     if (ToolBoxContainer.Orientation == Orientation.Horizontal)
     {
         toolBoxItemControl.Margin = new Thickness(10, 0, 0, 0);
     }
     else
     {
         toolBoxItemControl.Margin = new Thickness(0, 10, 0, 0);
     }
 }
Example #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);
        }