예제 #1
0
        public BehaviorToolButton(Behavior behavior)
        {
            ParentBehavior            = behavior;
            behavior.PropertyChanged += behavior_PropertyChanged;

            buttonGrid             = new ButtonGrid(behavior.Icon, behavior.Name);
            buttonGrid.IconTextGap = IconTextGap;
            Content = buttonGrid;
            buttonGrid.MouseLeftButtonDown += buttonGrid_MouseLeftButtonDown;
        }
예제 #2
0
        public CommandToolButton(Command command)
        {
            Command = command;
            command.AddObserver(this);

            buttonGrid = new ButtonGrid(command.Icon, command.Name);
            if (command.Icon is CheckBox)
            {
                command.Icon.IsHitTestVisible = false;
            }
            Content = buttonGrid;
            buttonGrid.MouseLeftButtonDown += Content_MouseLeftButtonDown;
        }