public cmdDragConnection(MainWindow mainWindow, Control control, EDraggedConnectionType draggedConnectionType) : base(mainWindow, control) { Debug.Assert(control is ToggleButton); DraggedConnectionType = draggedConnectionType; MainWindow.ActiveDiagramChanged += delegate { UntoggleButtons(); OnCanExecuteChanged(null); }; }
public void StateActivated(EDraggedConnectionType connectionType) { ((ToggleButton)this.Control).IsChecked = connectionType == DraggedConnectionType; }