public OutputWidget(OperatorPart opPart) { InitializeComponent(); OperatorPart = opPart; _MoveHandler = new MoveHandler(this); Height = CompositionGraphView.GRID_SIZE; Width = CompositionGraphView.GRID_SIZE * 3; UpdateColor(); Loaded += OutputWidget_Loaded; Unloaded += OutputWidget_Unloaded; }
public InputWidget(OperatorPart opPart) { InitializeComponent(); OperatorPart = opPart; m_MoveHandler = new MoveHandler(this); Height = CompositionGraphView.GRID_SIZE; Width = CompositionGraphView.GRID_SIZE * 3; operatorContent.Background = new SolidColorBrush(UIHelper.ColorFromType(OperatorPart.Type)); operatorContent.Background.Freeze(); NameLabel.Foreground = new SolidColorBrush(UIHelper.BrightColorFromType(OperatorPart.Type)); NameLabel.Foreground.Freeze(); }